|
Re: Label disappears [message #177721 is a reply to message #177526] |
Mon, 17 March 2008 16:46 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
Could you please submit a bug?
Manfred Hahn wrote:
> Hi,
>
> I had some problems with refreshing the child of a diagram node
> containing a WrapLabel (like the task element in the BPMN example):
> After a save operation the label wasn't displayed anymore!
>
> I store all my model elements including the diagram in a database using
> teneo. When a new element is stored the database gives an ID to the
> element. As a consequence the object reference in the node object (the
> element feature) is updated. Since the object in fact doesn't change
> this setting is not needed but nevertheless it is not forbidden to do
> it. The re-setting of the object leads to an refreshment of the node and
> it's children.
>
> The method GraphicalEditPart.refreshChild() does this with a
> removeChild() followed by a refreshChild().
>
> The removeChild() method calls the generated removeChildVisual() in the
> EditPart of the model element (the task in the BPMN example). Since the
> removedFixedChild() returns always false the super method is called,
> where the label is removed from the children list of the task figure.
>
> The refreshChild() method calls the generated addChildVisual() in the
> EditPart, but there the addFixedChild() has a special handling for the
> label-EditPart that resets the label. It does not add the label to the
> children list of the node figure!!! So the label vanishes from the node.
>
> I think the removeChildVisual() and the addChildVisual() has to do
> exactly the reverse. As a quick help I returned true from the
> removeFixedChild() thus disabling the call to the super method. But I
> think there has to be better handling of this situation.
>
> In which way should I change the removeChildVisual() and
> addChildVisual() methods for a correct behaviour in these situations?
>
> With regards
>
> Manfred Hahn
|
|
|
Powered by
FUDForum. Page generated in 0.03676 seconds