|ZoomManager bug?! [message #240848]
||Mon, 21 January 2008 11:19
Originally posted by: cfondacci.free.fr|
I think the zoom manager has a bug which took me hours of debugging my
Here it is :
If you ever call the ZoomManager.zoomAsText with the FIT_PAGE, FIT_HEIGHT or
FIT_WIDTH constants while your GEF viewer has 0-sized bounds you will NEVER
be able to get a FIT_xx zoom again.
This happened for me because I had a size listener on the viewer's control
which performs a ZOOM_FIT to always display the full diagram inside my RCP
The reason is that the "getFitXZoomLevel" method is multiplying the
available width & height by the current zoom factor to compute the scale. So
if for any reason your zoom factor is 0 (which happens when your control is
0-sized), it will stay to 0 forever.
The workaround is to always check your viewer's control size and ensure it
is not 0-width or 0-height before calling the zoomAsText method...
Should I submit a bug?
Powered by FUDForum
. Page generated in 0.01587 seconds