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
3 messages 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
Reply | Threaded
Open this post in threaded view
|

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

andykmv
it took me a while to get my head around the annoying second behaviour, over a few months, but oddly enough i find the mouse wheel "feature" kinda useful - a little bizarre, but i have come to like it!  

could it be a feature that could be toggled on/off ?
Reply | Threaded
Open this post in threaded view
|

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

dellus
In reply to this post by perepujal
I have never realized mouse wheel zoom is quirky, just found it a bit awkward and helped myself with Autozoom and zoomed in again if I had lost the area of interest. But now as you mention it...
I have looked how it is in other CADs, centering zoom at mouse position is the norm, and I feel that's how it should be.
I couldn't figure out what is the mechanism behind the current behaviour, can someone explain it?
Interestingly, I still have a portable of LC 2.0.3, and there mouse wheel zoom centers at mouse position and CTRL +/- centers at screen center!
If it is an easy fix it would be a candidate for inclusion in 2.2.0 final. Report an issue at Github?