[Solved]Ticket #4452 - Zooming with scroll wheel doesn't work

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!
qurn
Posts: 51
Joined: Wed Oct 10, 2018 4:49 pm

Re: [Bug] Zooming with scroll wheel doesn't work

Post by qurn »

My bad, its my first appimage, apologies. I confirm zooming by scrolling works as it should be with the appimage version.
(the buttons look badly scaled for high resolution screen though..)

OS: Arch Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22411 (Git) AppImage
Build type: Release
Branch: master
Hash: d4519d5aec15bc08f029da5ed15410a494b57b2c
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Bug] Zooming with scroll wheel doesn't work

Post by sgrogan »

qurn wrote: Wed Sep 16, 2020 9:42 pm My bad, its my first appimage, apologies. I confirm zooming by scrolling works as it should be with the appimage version.
(the buttons look badly scaled for high resolution screen though..)
No worries. Thanks for testing!
BTW: Thanks for posting the bug on the forum, so we can triage for the devs :)
"fight the good fight"
User avatar
babaroga
Posts: 180
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: [Bug] Zooming with scroll wheel doesn't work

Post by babaroga »

Hello,

I can confirm it has something with Qt 15.5.1
After my system update yesterday, mouse scroll wheel is not working in 3D view. It zoom OK in TechDraw WB and all others dialogs, report views. With Qt 15.5 everything worked OK.

Code: Select all

OS: Manjaro Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22611 (Git)
Build type: Release
Branch: master
Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3
Python version: 3.8.5
Qt version: 5.15.1
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
I did clean rebuild of FreeCAD from master, but problem persists.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: [Bug] Zooming with scroll wheel doesn't work

Post by jmaustpc »

babaroga wrote: Sat Oct 03, 2020 9:47 am I did clean rebuild of FreeCAD from master, but problem persists.
It could be worth backing up the contents of your "./freecad" config directory then deleting the contents. On next start FreeCAD will create new config files with default values. Thus resetting all you preferences, if you are lucky your problem may go away.
User avatar
babaroga
Posts: 180
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: [Bug] Zooming with scroll wheel doesn't work

Post by babaroga »

Unfortunately, no changes.

Deleted .FreeCAD folder and .config/FreeCAD but no changes.

I will try to investigate what changed in Qt 5.15.1
User avatar
Chris_G
Veteran
Posts: 2601
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: [Bug] Zooming with scroll wheel doesn't work

Post by Chris_G »

I can confirm this too, since upgrade to Qt 5.15.1

Code: Select all

OS: Manjaro Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22611 (Git)
Build type: Release
Branch: master
Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3
Python version: 3.8.5
Qt version: 5.15.0
Coin version: 4.0.0
OCC version: 7.4.0
Locale: French/France (fr_FR)
Strange : Qt is still reported as 5.15.0, on a brand new build ?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [Bug] Zooming with scroll wheel doesn't work

Post by DeepSOIC »

QWheelEvent docs say that delta() method that is used by FreeCAD (here) is obsolete. I guess that is our problem.
User avatar
babaroga
Posts: 180
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: [Bug] Zooming with scroll wheel doesn't work

Post by babaroga »

I tried with Mouse.cpp reverted to state with fake buttons, but still no luck... :(
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [Bug] Zooming with scroll wheel doesn't work

Post by DeepSOIC »

babaroga wrote: Sun Oct 04, 2020 7:34 pm I tried with Mouse.cpp reverted to state with fake buttons, but still no luck... :(
Can you please try replacing .delta() with .angleDelta().y() there?
User avatar
Chris_G
Veteran
Posts: 2601
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: [Bug] Zooming with scroll wheel doesn't work

Post by Chris_G »

I tried this, this afternoon, but no change :

Code: Select all

#include <QtCore/QPoint>
... / ...
QPoint numDegrees = event->angleDelta() / 8;
this->wheel->setDelta(numDegrees.y());
Post Reply