Commit Graph

33 Commits

Author SHA1 Message Date
Zheng, Lei
bb3baefdb5 Gui: refactor bounding box selection style
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.
2019-10-08 09:56:09 +02:00
wmayer
2feb777689 update bounding box if the placement of a geometry changes 2019-07-02 13:30:52 +02:00
wmayer
2f8179719e call updateData of base class for ViewProviderDragger and ViewProviderGeometryObject 2019-07-02 12:08:23 +02:00
wmayer
6b37fdc1a8 PVS issues:
consistently define copy constructor and assignment operator
remove superfluous casts
initialize member variables in constructor
avoid double assignment
2019-03-04 11:53:49 +01:00
wmayer
cfb04647b2 Do not use a view provider's bounding box node when handling BoundBox selection style because it leads to some inconsistent behaviour.
Instead let SoBoxSelectionRenderAction render the bounding box.
2018-10-26 00:39:15 +02:00
Arne
aff8280895 ViewProviderGeometryObject: set default random shape color to false 2018-04-21 13:51:51 +02:00
dulouie
2414219c94 fix small layout issues 2018-04-21 13:33:40 +02:00
Arne Schmidt
767d23b987 random shapecolor with toggle in settings dialog 2018-04-21 13:33:40 +02:00
wmayer
6a24bc9602 add class ViewProviderDragger
derive ViewProviderGeometryObject from ViewProviderDragger
derive ViewProviderPart from ViewProviderDragger
2017-11-26 15:42:57 +01:00
wmayer
4d63e9a4c4 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
Zheng, Lei
2707c43e52 Gui: allow bounding box style to be customized 2017-04-01 11:09:03 -03:00
Zheng, Lei
63a6f9c8c5 Gui: added bbox selection style to GeometryObject 2017-03-21 09:29:15 +01:00
wmayer
359a25d0c8 issue #0002802: Set a name to coin rootnodes of objects 2016-12-15 22:16:19 +01:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
DeepSOIC
8415bc32b6 Gui: Selection: pick radius support 2016-08-10 18:46:45 +02:00
wmayer
bcfe696229 close transform dialog when finishing edit mode 2016-08-05 22:02:03 +02:00
wmayer
fb7a22036e + fix build failures & warnings 2016-05-07 23:18:59 +02:00
blobfish
ae5224d342 Core: Gui: SoFCSysDragger: using SoFCSysDragger in ViewProviderGeometryObject 2016-05-07 23:07:08 +02:00
Mateusz Skowroński
6942c23895 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
wmayer
1cdb53ce79 + fixes #0002150: [Ctrl]+[Z] is buffered in a non-intuitive way, does not function in 'edit mode' 2015-09-15 14:30:15 +02:00
wmayer
6e0287ff17 + remove SoFCSelection from ViewProviderGeometryObject 2015-05-20 21:44:27 +02:00
Stefan Tröger
512a2b94d2 Adaption of FreeCAD to QuarterWidget
-removes all soqtviewer references
-create a quarter adaptor class which implements missing functionality
-adopts freecad code to make use of SoRenderManager and changed View3DInventorViewer  interface
2014-09-23 10:11:11 +02:00
wmayer
883d4ce9e3 + do not apply corrupted transformation (NaN) from SoCenterballManip 2014-08-11 14:56:30 +02:00
wmayer
8de7bd6d47 + fix displacement of bounding box 2014-03-17 10:56:38 +01:00
wmayer
95daf2953e 0001441: entering Transform mode degrades the Placemens rotation to single precision 2014-02-28 11:22:09 +01:00
wmayer
9234c7463d + fixes #0001441: entering Transform mode degrades the Placemens rotation to single precision 2014-02-27 14:43:07 +01:00
Yorik van Havre
ca448d8794 0001032: Preference setting for bounding box colour 2013-06-27 20:42:30 -03:00
wmayer
46084e435e 0000942: Crash when 2xdouble-click on part 2013-01-05 11:26:16 +01:00
wmayer
b06703fdde 0000939: Pressing Escape while pivoting a box crashes 2013-01-03 16:38:52 +01:00
Yorik van Havre
5c20d6bbdc 0000630: User-defined defaults for shape colors
The default colors for new geometry (light grey + 2px black line)
are now a user preference (In Display->Colors properties)
2012-08-13 09:42:05 -03:00
wmayer
086148bb01 Apply transformation only from Placement property 2012-04-09 16:02:46 +02:00
wmayer
c7985e5c06 + rework edit modes
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5102 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-08 21:15:49 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00