Modify

Opened 13 years ago

Closed 3 years ago

#6582 closed defect (duplicate)

command stack: no info about layers (seperate command stack per layer)

Reported by: skyper Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: command stack layer Cc: joshdoe

Description (last modified by skyper)

If you edit with more than one data layer, the commands get mixed up in one list without any info about the layer. If you switch layer several times with small adds on more than one it gets very confusing which edit had been down on which layer.

A info about layer switches or layer information on every edit in command stack is needed.

A major improvement would be a separated command stack per layer but you could work around with saves if you just want to delete changes on one layer.

Thanks

r4228

Attachments (0)

Change History (4)

comment:1 by skyper, 12 years ago

Description: modified (diff)
Priority: normalmajor

comment:2 by joshdoe, 12 years ago

Cc: joshdoe added

comment:3 by skyper, 4 years ago

michael2402 wrote in #13036 to comment:22:

...
(3)
While we are on it: Should we switch to a per-dataset command queue? It would make many things easier and Undo/Redo does not need to depend on the main layer manager any more. We should deprecate the Command() constructor for the same reason.

We can simply bind the Undo/Redo manager to each layer. So you can do:

dataSet.getCommandManager().doCommand(new AddPrimitivesCommand(...))

Or we can simplify this for the caller:

addCommand.doCommand()
-> call dataSet.getCommandManager().doCommand(this: AddPrimitivesCommand)
-> call addCommand.run() throws CommandFailedException (good to make users aware that this method should not be called directly)

It might be a plus for users as well if we don't change things in hidden layers on undo but only in the active, visible layer.

While we are on it: Make that undo/redo queue implement an interface (e.g. UndoRedo). then add a UndoRedo getUndoRedo() to the Layer class. It will make the code much more universal and we can add undo/redo to other layers later without changing the UI code.

comment:4 by skyper, 3 years ago

Resolution: duplicate
Status: newclosed

Closed as duplicate of #17196.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.