Commit Graph

49 Commits

Author SHA1 Message Date
wmayer
b7bf4d40b6 Gui: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316550 (#1 of 1): Uninitialized scalar variable (UNINIT)
13. uninit_use_in_call: Using uninitialized value sel. Field sel.pResolvedObject is uninitialized when calling push_back
2021-02-21 16:00:01 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
45e0673645 LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
6426161ed8 PVS: V572 It is odd that the object which was created using 'new' operator is immediately cast to another type 2020-07-18 10:59:28 +02:00
luz.paz
ef37cc3930 Fix typos [skip-ci]
Found via codespell v1.18.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-06-29 20:52:23 +02:00
wmayer
515250485e Gui: [skip ci] fix unicode handling when showing units in status bar 2020-06-04 16:27:58 +02:00
wmayer
0d4f196c60 Gui: let each coordinate use its own unit to avoid that the displayed values can become very huge 2020-05-30 17:16:32 +02:00
wmayer
c374a6faa9 Gui: implement a static function schemaTranslatePoint to avoid code duplication 2020-05-30 16:46:35 +02:00
0penBrain
01e21f2f11 [FC] Status bar preselection coordinates are aware of user unit setting ; fixes #4148 2020-05-30 12:29:58 +02:00
wmayer
08b54bb5a0 [skip ci] line width must be explicitly set in NaviCube and SoFCSelectionRoot to avoid that an inappropriate value is used when set from somewhere else 2019-11-10 11:13:10 +01:00
wmayer
6d515aa60c fix build failure on Windows due to conflicting define of GDI API 2019-10-08 14:49:56 +02:00
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
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
b1a2007759 Gui: fix missing de-highlight when (pre)selection is disabled 2019-08-17 15:32:51 +02:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +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
Dion Moult
68b43c6715 Clear existing preselects when setting a new preselect 2019-05-08 10:26:55 -03: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
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
wmayer
fea662ea71 notify selection node about cleared pre-selection 2017-12-25 01:19:02 +01:00
wmayer
85619bff50 fixes #0003153: Preselect: Show object label in status bar 2017-09-20 22:52:09 +02:00
wmayer
501327d2c5 do not clear selection when clicking on empty space while Ctrl key is pressed 2017-09-04 22:53:15 +02:00
wmayer
ac7b0fa2d8 Qt5OpenGL: replace gluOrtho2D for macOS, move includes of GL stuff from header to source 2017-03-24 10:28:57 +01:00
Zheng, Lei
7344c5e976 Gui: do not round pre-select coord display 2017-03-22 15:51:21 +08:00
wmayer
9e42badfaf move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
Zheng, Lei
772827b49b Gui: increase pre-select information display
The pre-select sub-element string maybe clipped depending on the main
window size. This patch increased sub-element display width by
increasing MainWindow::showMessage text width and shortening pre-select
coordinate information.
2017-03-21 10:05:52 +01:00
Zheng, Lei
63a6f9c8c5 Gui: added bbox selection style to GeometryObject 2017-03-21 09:29:15 +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
64223b7f4c issue #0001999: [STEP] Tessellation data or OpenInventor data memory leak 2017-02-20 10:08:18 +01:00
wmayer
936d83992d remove timeout for status messages related to (pre-)selection 2016-09-10 17:26:40 +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
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
b795914629 + fixes #0002222: Number of normals in exported VRML is wrong 2015-09-14 14:45:34 +02:00
wmayer
a6a4bea1c5 + fixes #0001945: selection out of sync with viewer 2015-02-13 22:26:04 +01:00
wmayer
00d92f7646 + fixes #0001363: VRML export can produce corrupt files 2014-12-02 15:40:36 +01:00
wmayer
696d4a5f4a + fix warnings with clang 2014-09-24 17:46:04 +02:00
wmayer
55984a200f + fix flaws found with code analyzer tool 2014-05-07 13:09:44 +02:00
wmayer
d133ba4070 + fix build failure, fix warning 2014-04-06 10:23:17 +02:00
wmayer
dcb3a55f57 + restore arrow cursor when mouse moves into empty area in 3d view 2014-04-05 19:57:40 +02:00
wmayer
60d9605fa5 0001064: Crash occurs in version 0.13 when trying to use alignment tool 2013-03-30 14:46:51 +01:00
jriegel
61914bc772 Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
wmayer
f0bdf1b786 0000911: V0.13- Faces of Solid models cannot be selected when ALT-TAB is used to switch between applications 2012-12-27 12:29:44 +01:00
wmayer
df7c1ea1dc + handle case if each face has its own color and a face has no triangles
+ do not write out fields of SoFCUnifiedSelection node
+ show wait cursor when importing parts

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5406 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-14 01:19:33 +00:00
wmayer
e95de7090d + add method to get SoDetail from element name
+ fix broken selection mechanism

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5260 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 21:11:20 +00:00
wmayer
73dd4ab9eb + respect Selectable property in SoFCUnifiedSelection node
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5136 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-15 10:04:21 +00:00
wmayer
78b1282a26 + utility to create edges, faces, shells and solids from selection
+fix a couple of selection bugs in SoFCUnifiedSelection node

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5016 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-14 14:05:28 +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