grass icon indicating copy to clipboard operation
grass copied to clipboard

wxGUI/history: Order commands by time and optimize node refresh

Open lindakarlovska opened this issue 8 months ago • 0 comments

This PR addresses several interconnected enhancements that have been linked into a single PR:

  1. Command Ordering: Commands are now ordered from newest (at the top) to oldest. Originally, they were not sorted - there was not mechanism for that.

  2. Node Refresh Optimization:

  • Replaces the method _refreshTree(), which only refreshed and sorted day nodes, with _reloadNode(), which reloads and sorts both day nodes and command nodes.
  • When a node is updated with new information (after a command run finishes), the update is made directly to the node's attributes. Previously, the node was removed and re-added, which caused delay. Refreshing and sorting are now made through new methods in the new HistoryTreeModel .
  1. Refactoring: Necessary refactoring to support the changes in command ordering and optimization improvements.

lindakarlovska avatar Jun 19 '24 11:06 lindakarlovska