Prompted by the CTRL-V vs. CTRL-D discussion in another thread, I began to play with the two functions side by side - and stumbled into an interesting behavior - that I think is a defect:
Create two objects (e.g., Circle and Rectangle)
Select the CIRCLE and press CTRL-C
Select the RECTANGLE and Press CTRL-D
You are now in the Duplicate Dialog
Each time you click the mouse, you will Duplicate the RECTANGLE (Expected)
Also expected, if you click CTRL-V, you will paste the CIRCLE (this is correct behavior)
However, from that point forward, if you click the mouse, you will duplicate THE CIRCLE (I guess because it is the highlighted object after the paste).
This isn’t a big defect, but it is unexpected behavior. Once you select CTRL-D, you don’t expect the object being duplicated to change - under any situation…but, because it seems to be duplicating whatever item is selected at the time of the mouse click, it is duplicating a different object.
The solution is either to prevent CTRL-V when in the Duplicate menu (less desirable), or remember the object being duplicated at the time of CTRL-D and duplicate that memorized value whenever the mouse click is made rather than the currently selected item (more desirable).
A third option is to end the Duplicate command when you start the Paste command. This is how I think most software would deal with it. It is a strange (although maybe useful) workflow to be able to paste from the clipboard in the middle of another modal command.
@ZoltanTheZ I would agree with you, except CTRL-D isn’t REALLY a modal command. It’s actually Quasi-Modal.
For example, there actually another interesting glitch in the CTRL-D processing, which :
If you hit CTRL-Z (Undo), to undo the last duplication, the entire duplication dialog ends. Any duplications up to that point (with the exception of the last one that you wanted to undo) is still present (that’s good), but nothing is selected. You can’t continue to duplicate - and you can’t even just press CTRL-D again, because you’ve lost your selection. This is not what you’d expect from a modal dialog.
What I would expect, were CTRL-D modal, is it’s work would be treated as a unit of work. Within the Modal Dialog, CTRL-Z would undo the duplications, but the dialog would remain active. It would not undo anything past the start of the Duplicate dialog. Then, when you close and accept the dialog, if you pressed CTRL-Z, you would Undo ALL of the duplications of the modal dialog as one unit of work. Subsequent pushes of CTRL-Z would revert history before the Duplicate dialog took place. Pressing CTRL-Y (Redo) would re-do ALL of the Duplicaitons as one item. This is clearly not the way it works.
What I see is that each time you duplicate an item, the duplicated item becomes the selected item. When you “Undo” this, you lose selection (and close the dialog). This 99.9% confirms my theory that, when in the Duplicate dialog, each time you click, the code looks to see which item is currently selected and duplicates that one. It is not re-duplicating the items that were selected when CTRL-D was first pushed (my “complaint” in the previous part of this post).
I don’t think this really warrants a rewrite of this function…as I’m sure @robgrz has more important things to do — and, I honestly missed all of this during the extensive beta…which is my bad. It’s just interesting to note that there are some anomalies to watch out for.