Zoom in/out with mouse wheel doesn't perform the same as zoom in/out with CTRL +-

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Zoom in/out with mouse wheel doesn't perform the same as zoom in/out with CTRL +-

perepujal
Hi,
I ve just noticed this, if you zoom in/out with the key combo, the center of the transformation is the mouse position(if the mouse is in the canvas), and after some CTRL + and CTRL - you are able to get the first view, usefull to zoom out, see some detail and zoom in again, or the inverse.

Instead if you zoom in/out with the mouse wheel, then the center of the transformation for zoom is not the mouse position, nor the center of the canvas and the view gets displaced differently for zoom in and zoom out and the drawing gets displaced losing the original view

I personally prefer the first behavior,
if in src/ui/qg_graphicview.cpp you left the calls for zoom in and out as
setCurrentAction(new RS_ActionZoomIn(*container, *this, RS2::In, RS2::Both));
and
setCurrentAction(new RS_ActionZoomIn(*container, *this, RS2::Out, RS2::Both));
discarding the effect and zoomfactor stuff, then the mouse wheel performs like CTRL +- combo.

Note that the discarded code may be there for a reason, so maybe is not a good idea to plainly discard it.

Also note that the CTRL +- zoom combo still has some displacement, but far far less than the mouse wheel currently.

HTH
Pere