CQ-editor
CQ-editor copied to clipboard
View improvements
Some changes to the 3D view that I find useful:
- I changed view rotation to behave like blender in a way that I find much more usable. I'm not sure if the behaviour has a specific name, but I would describe it as 'orbit':
- x movement rotates the view about the world z-axis passing through the point that the camera is looking at
- y movement rotates the view about the local y-axis passing through the point that the camera is looking at
- I find with the previous rotation handling, that it is very hard to look at something without the view being tilted in an undesirable way
- I added an option in the preferences to switch between this mode and the original (with orbit set as default)
- zoom handles scroll delta properly. This is especially important for laptop trackpads where wheel events are triggered even for tiny movements but with a small delta. Before the change the delta value was not taken into account which caused erratic zooming that was difficult to control.
- the toolbar background color is set to grey so that the icons are more visible when a dark theme is used
- another approach would be to create icons for dark mode but this is simpler
- also set tooltip backgrounds to improve legibility
- unrelated to the view, I added support for exiting the application with Ctrl+C
Demo of the new rotation behaviour:
https://user-images.githubusercontent.com/4923501/105905691-aa72d280-601a-11eb-8d74-27950ab8658c.mp4
toolbar before and after:


Codecov Report
Attention: 31 lines in your changes are missing coverage. Please review.
Comparison is base (
4ef178a) 88.60% compared to head (84968a9) 87.33%.
Additional details and impacted files
@@ Coverage Diff @@
## master #220 +/- ##
==========================================
- Coverage 88.60% 87.33% -1.27%
==========================================
Files 19 19
Lines 1553 1587 +34
Branches 189 196 +7
==========================================
+ Hits 1376 1386 +10
- Misses 143 163 +20
- Partials 34 38 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I've pulled and built this. I'm a huge fan of that orbital movement! ctrl-c also works nice. I don't have a dark theme at hand so I didn't test that aspect.
I don't really mind that this hasn't been merged because I created this functionality for my own use as well, but is there a reason that no-one has looked at this for 5 months?
Thanks for opening the PR. Lack of time / you want to change the default behavior without first discussing.
apologies if I didn't follow the correct procedure. I didn't see any instructions for contributors so I assumed any discussion would happen here. I'm fine with setting the original behaviour as the default, that would be trivial to change
If you want to change something it is better to open an issue first. I'll try to take a look but TBH this is not the highest prio ATM and I'm rather conservative regarding adding new functionality/complicating the codebase.
BTW: The ctrl-c is stuff is definitely worth adding.
by the way, I found that FreeCAD calls this mode 'Turntable' (in preferences > Display > Navigation > Orbit Style)
Any chance this can be picked up again? I too find the default navigation behavior a lot more difficult to use than the way it works in Blender. I wanted to work on this myself but I'm quite happy to see there is already a patch. Should this maybe be split into separate pull requests for each of the issues it covers?
I haven't used CQ-editor in ages but I merged with master and renamed the setting to match blender terminology that I think was established after this PR, or maybe I just didn't find it before.
I haven't tested extensively but in a quick test everything seems to be working