Closed tksoh closed 3 years ago
BTW, the only way to get out from the dialog loop is to enter some commands or delete the new item.
Also, after deleting the new entry (still blank), if I add another new entry (still leave it blank), I could click on other entry without any of the discard entry and enter macro command dialogs.
Hi, this is kind of the same on my Mac build. (Which is from the default download of 18 Jan). If you start a "new" macro with New, and then click on some other macro in the list, I get a slightly erroneous dialog sequence. But I seem to be able to get out of it ok with just Delete of the unwanted macro. Once by some combo I even got two empty New macros, I think. But some sensible Quit and Delete actions seem to clean it all up. There doesn't seem to be a fatal hazard that gets the macro system corrupted. I don't know .. it "feels" like there are a lot of pathways out of "New Macro" and they're not all totally tied down, but nothing leads to a fatal situation. It's a very complicated Dialog, our friend "Macro Dialog", maybe it's ok if some weird user choices lead to an unexpected step or two ??
Once by some combo I even got two empty New macros, I think.
I believe I saw this too, but I didn't try to recreate it, yet.
Interesting, I'll take a look.
Frankly, I'd like to for 6.1 change how "new" entries are handled.
Basically, I don't like that new items are by default, invalid.
So I am considering when you click new, that maybe a dialog would pop up asking you to fill in all fields, and the new item is only created if you fill out that dialog sensibly.
Otherwise, no new item is created.
Yea, this is definitely a bug. Good find!
Adding this to the 6.0 milestone.
Same issue with all 3 dialogs of similar type (Macros, Shell, Window Background Menu)
I am slightly confused. I imagine if we click on Discard, NG could just delete the 'New Item' entry from the list, as if we click Delete. No?
Indeed, it should ... but it does not ;-)
And surprisingly, the code to handle this corner case of discard meaning "delete" is a little more nuenced than one might expect.
The code currently takes discard to mean "ignore any changes to the entry"... but we want the entry to cease to exist. I have a few ideas about how to handle it elegantly, we'll see how it goes.
OK, I have a plan for how to fix this in a way that will work very well, I'm a bit busy work-wise, so I may not be able to tackle it until the weekend. Stay tuned ;-)
@tksoh @grege2 After FOREVER, I finally have a fix in for this one. Sorry that it took so long. I was originally planning an elaborate state machine that would push and pop states of the dialog so we could have a universal undo/redo for it... but that just ended up being so much overkill.
In the end, just a tiny bit of extra logic did the trick!
Please re-open if the issue or a variation of it still persists.
That's great. Would try it soon.
@eteran Thanks Evan, I will check it as soon as I rebuild my Nedit. Cheers.
Running commit 959597a9c1bf2ad07aae3ec34667b0f6b2f82dca, on Windows 10.
The macro editor somehow refuses to discard the new macro entryI accidentally added: