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

Bug 194024

Summary: Lightweight system appears to have a problem setting bounds on a contained viewport in certain scenarios
Product: [Tools] GEF Reporter: Chris McGee <cbmcgee>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris McGee CLA 2007-06-22 14:19:09 EDT
I am currently working with a graphical viewer, which uses a viewport underneath the root figure. In certain scenarios when I bring the viewer up, it does not set the bounds on the viewport properly. This often happens when eclipse quickly resizes the toolbars at the top. This causes some unnecessary scrollbars to appear. Note that when stretching the viewer after it has been shown, the problem appears to correct itself.

I have observed that the viewport and/or other figures in the containment tree underneath the viewport are not invalidated and retain their same invalid bounds (and client area).

To workaround the problem, I have subclassed the LightweightSystem and overrode the controlResized() method to invalidate the root figure's entire subtree to force all preferred sizes to be recalculated and the bounds to be set properly given the current FigureCanvas size. I notice that the default behvaiour of the LightweightSystem is to revalidate (ie. invalidate) only the root figure.
Comment 1 Randy Hudson CLA 2007-06-25 10:59:07 EDT
If you are using "Freeform" viewport, layers, etc., it is impossible for the scrollbars to be in auto mode. You must force the scrollbars to be always visible, or you will get infinite layouts in the boundary cases.
Comment 2 Alexander Nyßen CLA 2014-08-09 07:10:46 EDT
Resolving as INVALID due to comment #1.