An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
PropertyLinkItem now support all major types of link property.
PropertyLinkListItem is no longer necessary, but kept for backward
compatible, which is now identical to PropertyLinkItem.
DlgPropertyLink, the link selection dialog, is now made modeless, so
that that user can select geometry sub-element directory from 3D view.
Previously, box style selection is rendered using customized
SoBoxSelectionRenderAction, which does not support selection context,
i.e. it does not work with Link.
This patch implements context aware bound box rendering inside
SoFCSelectionRoot, SoFCSelection and SoFCPathAnnotation (for always on
top rendering). The box rendering in SoBoxSelectionRenderAction is
disabled on construction. Box style selection can be enabled for
individual object through property SelectionStyle (moved from
ViewProviderGeometryObject to ViewProviderDocumentObject), or globally
through Parameter BaseApp/Preferences/View/ShowSelectionBoundingBox.
In addition, the parameter BaseApp/Preferences/View/UseNewSelection is
used to override selection model reported from
ViewProvider::useNewSelectionModel(). The reason being that, the same
parameter is already used to toggle selection model inside
SoFCSelection. This avoids inconsistency of selection model choice
between view provider and the SoFCSelection node inside. Note that if
the parameter 'UseNewSelection' is set to false, those view providers
that choose old selection model will not work with Link.
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.
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.
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.
====================
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
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.
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`