Skip to content

Development for Issue #514#520

Merged
crossrulz merged 17 commits into
ni:feature/514-multiple-undos-required-for-some-actionsfrom
crossrulz:feature/514-multiple-undos-required-for-some-actions
Apr 2, 2026
Merged

Development for Issue #514#520
crossrulz merged 17 commits into
ni:feature/514-multiple-undos-required-for-some-actionsfrom
crossrulz:feature/514-multiple-undos-required-for-some-actions

Conversation

@crossrulz
Copy link
Copy Markdown
Collaborator

Development for Issue #514

  • Created a History library and class to handle the undo/redo stack. The class is replacing the FGV_Undo Redo.vi.
  • History.lvclass was added to IE Classes.ctl, which is included in Global Data.ctl. This caused many VI updates purely related to the use of Global Data.ctl.
  • Moved Apply Body Text.vi and Add Data To History.vi to be called in the case structure with DrawIcon.vi. This makes it so that the icon text and adding to the undo/redo stack is performed after every action without the need to call them either directly or by creating an event.
  • Replaced all other calls to Add Data To History.vi with Set Undo Flag.vi. This flag is used by the Add Data To History.vi to see if actions should be added to the undo stack. The flag is cleared in the Add Data To History.vi to avoid the flag being persistent.
  • Removed all found Value(Signaling) property writes for the Body Text control. These were used to force the event that would draw the icon text, which often led to multiple undo states for a single action.
  • Fixed bug where Clear All menu item was not clearing out the Icon Template layer control. Template layer was still being cleared in the icon data, just not the control.
  • Updated unit tests related to the FGV_Undo Redo.vi to use History.lvclass instead. The tests were renamed accordingly. A unit test was added for testing the undo flag.

crossrulz added 17 commits April 2, 2026 14:39
Moved calling of Value Change_Body Text.vi to after the Event Structure
Renamed Value Change_Body Text.vi to Apply Body Text.vi
Moved VI into the lv_icon library
Eliminated all calls to Fire Body Text Change.vi as it is not needed anymore with Apply Body Text.vi being called after the Event Structure
Removed Fire Body Text Change.vi
Still need to find other locations using the Body Text Value Change Signaling property
Moved Undo Redo Action.ctl into History class
Cleanup of Body Text:Value Change event
Added History class to Global Data
Created VI to build up the history state from the global data
Updated Classes Initialization.vi to use method
Beginning of replacing FGV_Undo Redo.vi with class methods
Can now Add State, Get Current State, and Check for Changes
Made necessary updates to Add Data to History and other VIs that were broken
Still need to implement the Undo and Redo methods
Renamed class and moved to new folder
Added unit test Test Undo Flag
Renamed Replay Data from History.vi to Set to State.vi
Changed all calls to Add Data to History.vi to Set Undo Flag.vi
Removed setting of the undo flag from ViewLayer.vi and corrected all callers
Required clearing the undo flag even when data not added to the stack
Clear Template layer on Layers tab when performing a Clear All
@crossrulz crossrulz merged commit 0e5e34b into ni:feature/514-multiple-undos-required-for-some-actions Apr 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant