Skip to content

Commit

Permalink
bugfix for showing the traceinfotags
Browse files Browse the repository at this point in the history
Previously the traceinfotags were not reliably activated in the
aftercompilehook.

The new approach uses the result of the menu toggle operation
DoIgorMenu/OVRD only to determine the actual state of the menu entry.
As before a graph window must be open and visible such that the "Graph" menu is
present.

Since introduction in:
599e797 (Add ShowTraceInfoTags, 2021-07-05)
  • Loading branch information
MichaelHuth committed Aug 7, 2023
1 parent 44a1aa2 commit eceba1d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Packages/MIES/MIES_GuiUtilities.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -2133,14 +2133,15 @@ End
/// @brief Enable show trace info tags globally
Function ShowTraceInfoTags()

DoIgorMenu/C "Graph", "Show Trace Info Tags"

if(cmpStr(S_value,"Hide Trace Info Tags"))
// add graph so that the menu item is available
Display
Display
// Window must not be hidden
// Returns in S_value the state before toggling
DoIgorMenu/OVRD "Graph", "Show Trace Info Tags"
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"
KillWindow/Z $S_name
endif
KillWindow/Z $S_name
End

/// @brief Return the recreation macro and the type of the given control
Expand Down

0 comments on commit eceba1d

Please sign in to comment.