Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
On Thursday, July 13, 2023 at 5:43:26 PM UTC-5 Félix wrote: There's no shame in having big data-changing commands not be undoable! Big software packages often have such commands! On the other hand, it should be somewhat indicated when an action is not undoable. (perhaps add "This action is

Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
On Thursday, July 13, 2023 at 11:53:17 AM UTC-5 Edward K. Ream wrote: > Otoh, undoing an accidental abbreviation is essential. Happily, the existing code handles non-tree abbreviations. Fully undoing a tree abbreviation would be harder. Happily, it's not necessary. Undo *does* work just as

Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Félix
There's no shame in having big data-changing commands not be undoable! Big software packages often have such commands! On the other hand, it should be somewhat indicated when an action is not undoable. (perhaps add "This action is not undoable" in the string where the user is asked about

Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
On Thursday, July 13, 2023 at 8:57:57 AM UTC-5 Edward K. Ream wrote: On Thu, Jul 13, 2023 at 7:49 AM Edward K. Ream wrote: > On second thought, *none of *[the git-diff commands] *need to be undoable* . Otoh, undoing an accidental abbreviation is essential. It's the only hard case, but I am

Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
On Thu, Jul 13, 2023 at 7:49 AM Edward K. Ream wrote: > On second thought, *none of *[the git-diff commands] *need to be undoable* . Probably still true, but it may be possible to undo them easily enough. All code that contains changed undo/redo code will be covered with new unit tests.

Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
On Thursday, July 13, 2023 at 7:07:10 AM UTC-5 Edward K. Ream wrote: Various commands and methods create a single new node. Their undo logic can mimic that of undo/redo insert-node. Undoing these commands would delete the newly-created node. Redo would undo the delete. All those commands

ENB: big problems with undo/redo tree operations

2023-07-13 Thread Edward K. Ream
While working on issue #3435 , I see that *u.saveTree* can't possibly work! About a dozen commands and methods call u.saveTree indirectly. Undo and redo for these may be dangerous! This Engineering Notebook post discusses what to do