Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] AbstractEditPart.refresh()

One of the editors I'm building needs to calculate a position for each new child based on the existing children, but the current implementation of AbstractEditPart.refresh() makes that difficult.

Ideally (or so I think), adding/removing a child would happen in two stages -- the child gets added or removed (from refreshChildren()) then the display is updated to match (refreshVisuals()). But the implementation calls refreshVisuals() before refreshChildren(), with changes made in refreshChildren() not triggering a subsequent call to refresh(). I'm curious about this design decision and wonder if these two calls should be reversed in 2.2.

Until then, I'm overriding refresh(), calling super.refresh(), and then adjusting the new child visuals. (Sugegstions for doing this "the right way" gratefully accepted).

..Richard



Back to the top