Do you have an idea which other package I have to install?
After installing the packages I had to open a new terminal window in order to set the last variable. So, this gives me this configuration:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15051 (Git)
Build type: Release
Branch: master
Hash: 4cff87ed572499b4b1155dffdf4c4ba37e28dec0
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0 Locale: Russian/RussianFederation (ru_RU)
and there was no problem (I had to set manually $HOME, LC_ALL and DISPLAY variables). So I began to exclude variables from my environment and found another variable that has to be set:
Only combination of LC_ALL=ru_RU.UTF8 (or any other variant of ru_RU) with KDE_FULL_SESSION=true causes zooming problem.
Automatically Set Variables
KDE_FULL_SESSION
Set to true by KDE startup, it is used by some programs, such as Konqueror, to know if they should consider remaining in memory for future re-use when being closed. If not set, those programs will exit after being closed (e.g. kdesu does that, it's also useful for debugging).
If you plan on using this variable to detect a running KDE session, check if the value is not empty instead of seeing if it equals true. The value might be changed in the future to include KDE version information.
Our 3d viewer is based on the (modified) Quarter API (it's the successor of SoQt implemented by the Coin3d team) and there an event filter is used that converts Qt events into OpenInventor events. This event filter then invokes View3DInventorViewer::processSoEvent
When looking at this code I cannot detect anything weird wrt to zooming.
However, I found a second event filter directly used by the View3DInventorViewer class. And there is a suspicious block that actively filters out some wheel events:
if (event->type() == QEvent::Wheel) {
QWheelEvent* we = static_cast<QWheelEvent*>(event);
if (we->orientation() == Qt::Horizontal)
return true;
}
I wonder if the combination of LC_ALL=ru_RU.UTF8 and KDE_FULL_SESSION=true causes this block to filter the wheel events. Do you have a chance to build your own FreeCAD binaries to check this idea?
How do you debug FreeCAD on Linux? I built Debug version, but gdb can't find source file View3DInventorViewer.cpp, so I can't set up breakpoint.
It's some time ago that I had to debug something directly with gdb but AFAIR you have to do gdb ./FreeCAD, then set the break point and then call run. But if you can't get it working this way you still can add printf statements into the code. And to reduce compile and link time pass the target name + fast to make, e.g. make FreeCADGui/fast
dragon pts/19%gdb FreeCAD
[~/freecad-src/freecad-debug/bin 18:37 Пн 29]
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from FreeCAD...done.
(gdb) break View3DInventorViewer.cpp:3083
No source file named View3DInventorViewer.cpp.
Make breakpoint pending on future shared library load? (y or [n])
(gdb)
But if you can't get it working this way you still can add printf statements into the code.
Yes. I modified that code to print some debug information: