Community
Participate
Working Groups
Currently, we assume that a the Undo gives us a correct model, but doesn't redraw the diagram. To redraw the diagram we need : - replace executeCommand(command); by executeCommandInCommandStack(command); in org.eclipse.papyrus.diagram.composite.custom.edit.policies.PartEditPolicy, - do 2 Undo in the diagram We don't choose this last solution, because if the user does only 1 Undo, the drawn model is corrupted. -> We need a Undo which take the 2 last actions in the CommandStack. Steps to Reproduce the problem: 1. Create 2 classes, Class0 and Class1 2. Create 1 Property in Class0, named PropertyClass0 3. Create 1 Property in Class1, named PropertyClass1 4. Type PropertyClass0, with Class1 5. Drop PropertyClass1 in PropertyClass0 6. Change the type of PropertyClass0 to <Undefined> 7. Do Undo -> if you have replaced executeCommand(command); by executeCommandInCommandStack(command); with 1 Undo, you have a bad model : PropertyClass1 is redrawn, but the type is still <Undefined> with 2 Undo, you have a correct model -> if not, you have a correct model, the type is Class1, but PropertyClass is not redrawn
Fixed by Bug307317.