Opened 3 years ago
Closed 3 years ago
#22300 closed enhancement (duplicate)
Not possible to undo merge layer / merge selection command
Reported by: | olejorgenb | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | merge undo | Cc: |
Description (last modified by )
This just lost me about an hour of manual work after mistakenly merging my whole workset into my "done" layer :(
Tip to future travelers: If I had kept a temporary "in-progress" tag on my workset I could have recovered.
Attachments (0)
Change History (8)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|---|
Type: | defect → enhancement |
comment:2 by , 3 years ago
comment:3 by , 3 years ago
Yeah I can see it becoming complex. I was not aware of the new/modified filter. Not sure if it would've helped, but nice to know. Probably best solved by adapting a more robust workflow.
follow-up: 5 comment:4 by , 3 years ago
We have merge code in the reverter plugin which allows undo/redo. Maybe it can go into core?
comment:5 by , 3 years ago
Replying to GerdP:
We have merge code in the reverter plugin which allows undo/redo. Maybe it can go into core?
I wasn't aware of that the reverter plugin had undo/redo code across layers.
Since we have at least two plugins trying to support undo/redo across layers (reverter/MapWithAI), I think it would be nice to put it in core, especially since we have a potential core usecase. This might also be useful for the conflation plugin. If it doesn't have code doing that already.
My proposal:
- New interface (
MoveDataSetCommand
, probably parameterized to allow for data transfer across distinct data types, e.g.HistoryNode
->Node
) - Require the implementation of
getParticipatingPrimitives(OsmData<?, ?, ?, ?> data)
in the interface, have a default implementation ofgetParticipatingPrimitives()
set to callgetParticipatingPrimitives
with the current edit layer ornull
. - In the UndoRedo handler, check for the interface and use the current edit layer to figure out if it is relevant for the current edit layer.
comment:6 by , 3 years ago
Note: I managed to make the mistake again (but this time I had a semi-recent save and managed to grab the autosave as well). I'm quite sure it happens for me due to the very similar hotkeys: Ctrl-M for "merge layer" and Ctrl-Shift-M for "merge selection". The resulting dialog is not *that* different and when doing repetitive work the brain easily skips the button text.
The hotkey for merge layer is easy to disable. I'm quite sure this will solve my problems.
comment:7 by , 3 years ago
As a workaorund you may assign a different hotkey to one of the actions or remove it.
comment:8 by , 3 years ago
Keywords: | merge undo added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Closed as duplicate of #7489.
We really don't have a good way of undoing layer merges. I rather suspect that undo isn't available to avoid data integrity issues.
From my experience (MapWithAI plugin), it is a PITA to ensure that things go correctly when moving stuff between data sets. Making things go one way "fixes" a lot of the issues I ran into, since you just have to copy the data one way. With undo/redo, you have to keep references hanging around to ensure that other commands don't get borked due to the undo/redo commands.
With that said, depending upon how often you upload, you might have been able to use a search for
new
. Ormodified
, depending. See wiki:Help/Action/Search