Zoom factor of scroll wheel? Preference?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8576
Joined: Thu Dec 27, 2018 12:28 pm

Zoom factor of scroll wheel? Preference?

Post by Roy_043 »

The scroll wheel zoom seems to use a bigger zoom factor (per click) than the Std_ViewZoomIn and Std_ViewZoomOut commands. Is there a preference for this?

Edit: spelling.
Last edited by Roy_043 on Wed Apr 01, 2020 8:08 pm, edited 1 time in total.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Zoom factor of scroll wheel? Preference?

Post by jmaustpc »

Roy_043 wrote: Wed Apr 01, 2020 7:37 pm The scroll wheel zoom seems to use a bigger zoom factor (per click) then the Std_ViewZoomIn and Std_ViewZoomOut commands. Is there a preference for this?
It's preferences ...Display....Navigation tab ....Zoom Step (to the right of "zoom at cursor" tick box)

at least that is where it is in 0.19.

Jim

OS: Ubuntu 18.04.4 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
User avatar
Roy_043
Veteran
Posts: 8576
Joined: Thu Dec 27, 2018 12:28 pm

Re: Zoom factor of scroll wheel? Preference?

Post by Roy_043 »

That setting has an effect on 'scroll wheel' zoom but also on the zoom commands. I am looking for a setting (if any) to change 'scroll wheel' zoom only. A single scroll wheel click seems equal to using a zoom command twice.

Edit: Added 'click'.
Last edited by Roy_043 on Thu Apr 02, 2020 5:41 am, edited 1 time in total.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Zoom factor of scroll wheel? Preference?

Post by kisolre »

Might be OS setting that sends several events?
User avatar
Roy_043
Veteran
Posts: 8576
Joined: Thu Dec 27, 2018 12:28 pm

Re: Zoom factor of scroll wheel? Preference?

Post by Roy_043 »

I can change the number of text lines that a single mouse wheel click will scroll. But that setting has no effect in FreeCAD.
Syres
Veteran
Posts: 2901
Joined: Thu Aug 09, 2018 11:14 am

Re: Zoom factor of scroll wheel? Preference?

Post by Syres »

Taking note of my very limited C++ knowledge I'm guessing you should be looking in https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L687 , there's an explanation that I believe is relevant https://doc.qt.io/qt-5/qwheelevent.html#angleDelta
IMHO this should be a personalised parameter rather than a blanket setting as it appears to be at present if I've interpreted the code correctly.
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Zoom factor of scroll wheel? Preference?

Post by wmayer »

The zoom factor by wheel mouse is exactly twice the factor of Std_ViewZoomIn/Std_ViewZoomOut because the one and same event is handled twice.

This function is called only once
https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L1002

but before letting a QObject handle an event its event filters are called: https://github.com/FreeCAD/FreeCAD/blob ... r.cpp#L150
and this function is called twice.
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Zoom factor of scroll wheel? Preference?

Post by wmayer »

User avatar
Roy_043
Veteran
Posts: 8576
Joined: Thu Dec 27, 2018 12:28 pm

Re: Zoom factor of scroll wheel? Preference?

Post by Roy_043 »

@wmayer: Thank you!
Syres
Veteran
Posts: 2901
Joined: Thu Aug 09, 2018 11:14 am

Re: Zoom factor of scroll wheel? Preference?

Post by Syres »

wmayer wrote: Thu Apr 02, 2020 12:03 pm git commit 5324540d8
Possible Mac regression https://forum.freecadweb.org/viewtopic.php?f=4&t=44855
Post Reply