|Conflicted EditPolicies? [message #659174]
||Fri, 11 March 2011 06:44
Registered: July 2009
Hi everyone, |
i´ve got the following situation:
The user is able to create a figure "Alt" which can contain 0 to * "ConditionParts". The AltFigure has got a ToolbarLayoutPolicy, which automatically orders the conditionParts when they are added to the AltFigure.
Every ConditionPart has got the feature that it can contain several other figures, so i installed a XYLayoutEditPolicy in the ConditionPartEditPart. A person can also add elements that are already placed within the canvas to the ConditionPart. This functionality is provided due to the createAddCommand method within the XYLayoutEditPolicy.
The problem starts now: The user should be able to switch the position of the conditionParts within the Alt figure. So the AltEditPart installs the AbstractOrderListEditPolicy that handles the reordering.
The user wants to switch the position of ConditionPart2 with ConditionPart1, so he selects CP2 and moves it over the top of CP1. GEF thinks that i want to add something to ConditionPart1, which is not intended.
The reordering works just fine if i deactivate the Policy which allows you to add something to a conditionPart. How can i prevent GEF from trying to add ConditionPart2 to ConditionPart1?
Any help will be appreciated
Thank you very much
Powered by FUDForum
. Page generated in 0.01771 seconds