Skip to content

Commit

Permalink
Bugfix: Fix pending RTE from ShowTraceInfoTags
Browse files Browse the repository at this point in the history
Under special circumstance DoIgorMenu/OVRD returned a null string for S_value.
This was reported to WM and should be fixed in Igor Pro 9 Build 56469 or later.

This commit adds two checks that give a BUG message if S_value is either
returned null or empty as both should never happen.

since at least eceba1d (bugfix for showing the traceinfotags, 2023-08-07)
  • Loading branch information
MichaelHuth committed Sep 14, 2023
1 parent b434eba commit 77a24c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Packages/MIES/MIES_GuiUtilities.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,16 @@ Function ShowTraceInfoTags()
// Window must not be hidden
// Returns in S_value the state before toggling
DoIgorMenu/OVRD "Graph", "Show Trace Info Tags"
if(IsNull(S_value))
BUG("DoIgorMenu returned S_value as null string for \"Show Trace Info Tags\"")
KillWindow/Z $S_name
return NaN
endif
if(IsEmpty(S_value))
BUG("DoIgorMenu returned S_value as empty string for \"Show Trace Info Tags\"")
KillWindow/Z $S_name
return NaN
endif
if(CmpStr(S_value,"Show Trace Info Tags"))
// toggled to "Show Trace Info Tags", need to toggle back
DoIgorMenu/OVRD "Graph", "Show Trace Info Tags"
Expand Down

0 comments on commit 77a24c4

Please sign in to comment.