Open dave-doty opened 1 year ago
What should happen here is that autopaste should put the third strand immediately to the right of the second strand, as happened the first time that we only had two strands. In other words we need Undo to undo not only the change to which strands are in the design, but also undo the change in internal Autopaste data (stored in AppUIState.copy_info) that happens after each time you press Ctrl+Shift+V.
I think the most straightforward fix here is to include a CopyInfo
field in the UndoRedoItem
object, alongside the Design
.
Draw a strand:
Copy/Paste:
Press Ctrl+Shift+V to autopaste three times:
Press Ctrl+Z three times to undo:
Now press Ctrl+Shift+V to autopaste again:
Note that this goes in the place where autopaste would have pasted the next strand after the most recent autopaste. However, this is somewhat unexpected behavior; a user might expect "Undo" to mean "Undo the autopaste meta-information about where the next autopasted strand should go" and expected Autopaste to put the strand adjacent to the existing strands, as it did the first time.