Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ZoomManager bug?!
ZoomManager bug?! [message #240848] Mon, 21 January 2008 11:19
Eclipse UserFriend
Originally posted by:

Hello all,

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?

Previous Topic:Memory Leak
Next Topic:splines or bezier curves with Draw2D?
Goto Forum:

Current Time: Fri Jun 22 03:59:41 GMT 2018

Powered by FUDForum. Page generated in 0.01587 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top