Home » Modeling » Graphiti » Redo add feature leads to an empty dirty diagram
Redo add feature leads to an empty dirty diagram [message #1457611] |
Fri, 31 October 2014 14:09 |
Laurent Le Moux Messages: 184 Registered: September 2011 |
Senior Member |
|
|
Hi all,
I have got the following problem. I implemented an add feature similar to the Graphiti tutorial one.
It works great and so does the undo action.
But redo does not add my pictogram element back to the diagram which is however marked as dirty.
In the debugger, I tried to get an idea of my digram content with the following results :
Before add : clean empty diagram whose content is displayed as the following array in the debugger
[null, [], [], null, [], [Color@OID70, Color@OID71], null, []]
My diagram is stored in CDO. OIDxx stands for the CDO ID of each object.
After AbstractFeatureProvider.addIfPossible : the following new CDO objects populate my dirty diagram
[null, [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]
At this stage, everything looks normal and the PE is correctly displayed.
Before undo : dirty diagram
[[], [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]
Surprisingly, the first null entry has been replaced by an empty array...
After undo : except null replaced by the empty array, we are back to the initial diagram content which is marked as clean
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]
Berfore redo : clean diagram (fair enough...)
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]
After redo : dirty diagram and here, everything goes messy...
[[], [], [], null, [], [Color@OID70, Color@OID71, Color@oid17[NEW], Color@oid18[NEW], Color@oid19[NEW]], [], [PictogramLink@oid21[NEW], PictogramLink@oid24[NEW]]]
Colors and pictogram links have correctly been added back (with their new cdo IDs) but the container shape and the font objects are missing...
Any idea why this happens or where to look ?
Kind regards,
Laurent
|
|
| |
Goto Forum:
Current Time: Wed Apr 24 21:22:51 GMT 2024
Powered by FUDForum. Page generated in 0.04545 seconds
|