Commit Graph

163 Commits

Author SHA1 Message Date
wmayer
4068df6483 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-variable
+ fix -Wbraced-scalar-init
+ fix -Wparentheses (View3DInventorViewer::checkGroupOnTop: operator '?:' has lower precedence than '+'; '+' will be evaluated first)
+ fix -Wundefined-bool-conversion (MainWindow::updateActions)
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:52:12 +02:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
Zheng, Lei
c9ba972d26 Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00
luz.paz
2b02659010 Misc. typo and whitespace fixes
Found via `codespell`
2019-05-30 19:56:12 +02:00
Dion Moult
20795f1505 Actually highlight preselected objects upon the selectionchange event, otherwise it only triggers on mousemove event 2019-05-08 10:26:55 -03:00
wmayer
6c5a0cf125 fix build failure on Ubuntu Bionic 2019-02-13 10:46:55 +01:00
wmayer
2de2edb3ed fix build failures with newer compiler versions 2019-02-12 13:10:49 +01:00
Mateusz Skowroński
ac508516da Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
Abdullah Tahiri
8fabcc8d75 Thumbnail generation
====================

Dynamically check whether to apply the fix for thumbnail generation.

Some QT5 version seem to be affected. This problem appears in some linux distributions with some window managers.

You may check/activate this fix:

>>> hgrp = App.ParamGet("User parameter:BaseApp/Preferences/Document")
>>> hgrp.GetBool("SaveThumbnailFix")
False
>>> hgrp.SetBool("SaveThumbnailFix",True)
>>> hgrp.GetBool("SaveThumbnailFix")
True
2018-12-10 09:14:36 -03:00
DeepSOIC
47ae980fa2 Gui: Gesture: add option to disable tilt
On Qt5, using pinch will inevitably cause tilt. It's annoying, so it is disabled by default.

In the future, it's best to introduce some kind of threshold to overcome for the tilt to be triggered.
2018-11-29 15:29:27 -03:00
wmayer
f94445f9a9 add PS action to dumpToFile 2018-11-05 19:22:52 +01:00
luz.paz
7e221ab15d Misc. typos and whitespace fixes
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm" -I ../fc-word-whitelist.txt` and `grep`
2018-10-25 11:06:28 -03:00
wmayer
8392914f50 allow to access NaviCube of 3d viewer 2018-10-23 12:47:11 +02:00
wmayer
2877face0c avoid to degenerate the view frustum if there is only a single point in the scene 2018-10-15 14:08:46 +02:00
wmayer
644cfa06bb replace boolean to check for inside/outside cutting with enum values 2018-09-18 18:25:51 +02:00
wmayer
90258a47f0 move check for grabbed node and releasing it from ViewProviderDragger::unsetEditViewer to View3DInventorViewer::resetEditingViewProvider 2018-09-11 17:27:17 +02:00
wmayer
721e37d888 fix several reference counting bugs 2018-08-18 16:01:55 +02:00
wmayer
74ac2e76f1 clear selection node when destroying viewer 2018-08-18 11:32:32 +02:00
luz.paz
424cd49398 Typos and whitespace fixes 2018-08-07 11:13:31 -04:00
wmayer
9a3021818b implement option to change corner of navi cube 2018-05-26 18:51:53 +02:00
wmayer
3b4ab88844 + option to disable navi cube
+ handle destruction of GL context in 3d viewer class
+ fix for OpenGL error message: 'Texture is not valid in the current context. Texture has not been destroyed'
2018-05-26 15:33:45 +02:00
wmayer
68b979de5e fix Qt5 build failure 2018-05-26 15:33:45 +02:00
Kustaa Nyholm
e610965b5c First Qt5 compatible NaviCube attempt 2018-05-26 15:33:45 +02:00
wmayer
2264e8d484 further simplification when to use which rendering method when saving an image 2018-01-14 22:19:32 +01:00
wmayer
257ec15cff make workaround with transparent background more reliable 2018-01-12 15:47:40 +01:00
wmayer
9689717d34 workaround to create images with transparent background 2018-01-12 14:36:25 +01:00
wmayer
a9b1356bc7 code reduction w.r.t offscreen rendering 2018-01-07 17:12:50 +01:00
wmayer
292608e466 simplify to define when to use which offscreen rendering method 2018-01-07 15:00:40 +01:00
wmayer
fea662ea71 notify selection node about cleared pre-selection 2017-12-25 01:19:02 +01:00
wmayer
aa353569b3 enable anti-aliasing for Coin's offscreen renderer 2017-12-23 18:59:27 +01:00
Unknown
e3eca59173 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
2cd338ba03 improve whitespaces 2017-11-24 15:43:28 +01:00
wmayer
4d63e9a4c4 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
ed817b0e05 make retrieving view direction numerically more stable, change orientation of bottom view 2017-11-13 21:53:10 +01:00
wmayer
e9bed58f4b make the fps counter more stable 2017-10-13 00:13:19 +02:00
wmayer
5604e64f54 Various fixes:
+ disable VBO rendering in split views
+ activate multi-sampling in split view for manual alignment
+ share GL widget in case a document has multiple views to make VBO rendering work correctly
2017-09-23 11:14:41 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
764f9ce7e5 Qt5OpenGL: use OpenGL debug logger to locate problems, fix a couple of errors 2017-03-21 20:37:03 +01:00
wmayer
f13538a016 Qt5OpenGL: implement grabFramebuffer 2017-03-21 20:37:03 +01:00
wmayer
34f277e7bb Qt5OpenGL: make off-screen renderer working 2017-03-21 20:37:03 +01:00
wmayer
a04a7a6b21 Ot5OpenGL: fix phantom objects in sketcher selection mode, get texture with the exact content of the 3d viewer 2017-03-21 20:37:03 +01:00
wmayer
f8a14fc69e Qt5OpenGL: release context when finished 2017-03-21 20:37:03 +01:00
wmayer
0bec4dbd63 Qt5OpenGL: Framebufferobject rendering works and handles transparency and anti-aliasing 2017-03-21 20:37:03 +01:00
wmayer
6e026fd67b Qt5OpenGL: port Image rendering mode to make box zoom & selection and cutting work again 2017-03-21 20:37:03 +01:00
wmayer
9e42badfaf move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
Kunda
de2392eb18 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
wmayer
69e1297dd2 add 'no shading' and 'hidden line' styles 2017-03-03 16:41:38 +01:00
wmayer
c2f1bab784 implement correct way to query VBO status of viewer from SoBRepFaceSet node 2017-02-12 14:41:55 +01:00