|DeleteCommand and order of elements [message #544875]
||Mon, 05 July 2010 19:17
Originally posted by: micha.on.the.road.web.de|
I use the ComponentEditPolicy and implement createDeleteCommand()
returning a delete Command for a single object. Marking several objects
and deleting works fine but undo() mixes up the order of my models. It
is not possible to store the position to insert them properly.
I thought of a GEF bug - undo() wouldn't iterate reversely through the
list but it's not this.
The problem is that in DeleteAction a CompoundCommand is created but
every time - after on delete gets executed (caused by ... ->
handleSelectionChanged()->DeleteAction.refresh()) - it is refilled and
the order of my elements is mixed up.
So my question: what is the proper way to implement a DeleteCommand that
maintains order on undo?
Is there any way to avoid the creation of multiple DeleteCommands
embedded in a CompoundCommand? I would prefer to have one command for a
selection that deletes the list of children at once. Like this it would
be easy to maintain the order.
Thanks a lot
Powered by FUDForum
. Page generated in 0.02146 seconds