Skip to content

Commit

Permalink
Add comment to explain why check if PV instanceof DisplayProvider see
Browse files Browse the repository at this point in the history
  • Loading branch information
katysaintin committed Jan 14, 2025
1 parent 3f623d0 commit c3ab02a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ private void updateDescription() {
VType currentValue = getValue();
if(currentValue != null) {
PV thePV = pv.get();
// DisplayProvider is an optional interface for VType values,
// not PVs, but the custum datasource as Muscade happens to implement
// DisplayProvider for enum and bool PVs, so check for that here
Display display = thePV instanceof DisplayProvider ? ((DisplayProvider) thePV).getDisplay() : null;
display = display == null && currentValue instanceof DisplayProvider ? ((DisplayProvider) currentValue).getDisplay(): display;
if (display != null) {
Expand Down

0 comments on commit c3ab02a

Please sign in to comment.