Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512713

Summary: VisualChangeListener should defer bounds change notifications if the observed visual needs a layout pass
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.1.0   
Target Milestone: 5.0.0 (Oxygen) M6   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2017-02-24 12:48:01 EST
Currently, VisualChangeListener reports bounds changes as soon as all bounds properties (layout-bounds, bounds-in-local, and bounds-in-parent) have been updated. However, the observed visual might not be up-to-date when its bounds are changed, because the visual could be responsible for laying out its children, which is not immediately done, but only in the next layout pass (which is bound to the JavaFX pulse). Therefore, VisualChangeListener should defer invoking the callback method for bounds changes if the observed visual needs a layout pass.
Comment 1 Matthias Wienand CLA 2017-02-27 04:55:06 EST
I added a check for the needs-layout-property of the observed visual. If the visual needs a layout pass, then the bounds change notification is deferred until the visual was layed out. The code is published on the master branch, therefore, I resolve this ticket as fixed for 5.0.0 M6.