Dragging edited button around in menu - changes get lost

Hello! o)

I just noticed, when I edit a buttons content (a script button currently) and drag the actual button around in a menu while the button-editor window is open, the editor will ask 3 times: "The function has been modified - discard changes?". Always hitting "No" will still end up in losing the changes when finally closing the editor with "Ok".

Seems like a bug to me?!
Thanks! o)

We'll make it so moving buttons that are open in the editor is blocked in the next update, since it effectively cancels the edit.

Yep, not a perfect solution, but way better than losing the button changes unexpectedly. o)
I tend to copy & paste the button code before messing around with layout/other buttons while in customize mode, as it never really felt safe to mix different actions in this mode (editor windows hide each other, pop into background or they somehow get sticky). So I was prepared, did not lose my code changes! o)

1 Like

I think creating a copy of a button, while it's window is open should never be prevented if possible.
It was no problem so far!

On the other hand, I can see why dragging a button around, while it's editor is open could cause issues (the editor probably loses "connection" to the button/toolbar location?), but from my naive point of view, these are two separate things. I can see no reason why the currently edited button should be "copy-locked", I would not expect this. "drag-locked" yes, but "copy-locked"?

Maybe a table helps to get a better picture:

                        btneditor-open  btneditor-closed
copy button ctrl-c/v        yes                 yes
copy button drag-left       yes                 yes
drag button around          no                  yes
delete button               no                  yes

If you copy a button that you're editing, would you expect to get a copy of the button before you started editing, or a copy that includes the edits you've just made?

At the moment, it would be a copy of how the button was before you started editing. I think that's potentially confusing, but maybe not enough to block it from happening and force you to click OK in the editor before copying. Not sure.

(OTOH, the drag & drop blocking, at least as the code from yesterday stands currently, blocks all drag & drop of buttons open in editors, regardless of which keys are held down. I guess we could change it to allow dragging while Ctrl is down to copy buttons. Should probably make the ability to copy things consistent, one way or the other. Will have a think about it.)

As long as I do not "OK" the editor, I expect to get a copy like it was before opening and changing things in the editor window.
As in Notepad.exe, as long as I don't save, I expect an unchanged copy of the file, if I were to copy it while Notepad is still open but "unsaved". I don't think that's confusing, that's how every application works?

To be honest I would scream if I copy the button while I edit it, and I get some kind of "temporary" button clone, not the original, not the saved one, since I did not hit "Ok" yet, but something in between. No, that's not good! o)

Regarding the drag-situation, I think the difference is to make at the point where it's clear that this drag is about to drag the original away (block this) or dragging the original away to create a clone (allow this).

Good points. I've changed it so Ctrl + Drag will work like before.

If that was possible, very good, thx! o)

Changes for this are included in the new beta: Directory Opus 12.23.1 (Beta)

Thank you, I tried and it works! o)

1 Like