Commit Graph

55 Commits

Author SHA1 Message Date
luz paz
c16e88845b Gui: fix trailing whitespace 2022-12-02 19:18:54 -06:00
marioalexis
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
wmayer
ba8d5ab055 Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
berniev
6ac4d8392e Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Zheng, Lei
181d3f5536 Gui: fix ViewProviderLink transform with scale
Fixes FreeCAD/FreeCAD#7113
2022-07-30 19:12:03 +02:00
wmayer
6ee2c7f865 Fix several clazy issues:
* C++11 range-loop might detach Qt container [-Wclazy-range-loop-detach]
2022-07-24 23:48:37 +02:00
wmayer
0bef4e82f2 Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
2022-07-24 22:29:06 +02:00
wmayer
3f8dc1a5a8 Gui: fix crash in ViewProviderLink::currentDraggingPlacement() if there is no active dragger 2022-07-19 10:40:32 +02:00
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
Chris Hennes
7b204c01db Gui: Fix typo 2022-06-02 10:29:14 -05:00
luz paz
086d86ee11 Crowdin: fix whitespace and typo in translation string
Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/132
2022-05-08 18:21:04 +02:00
Zheng, Lei
8433a78807 Gui: fix crash on setup Link CopyOnChange objects 2022-05-05 11:37:38 -05:00
wmayer
a93997df64 Gui: issue #6765: Overlay Icons for Std Link nearly invisible small 2022-04-20 08:51:59 +02:00
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
Zheng, Lei
63ac642785 Gui: expose Link CopyOnChange setup through context menu
The CopyOnChange setup is meant to let user select which dependency to
copy when changing configuration.
2022-03-26 10:19:20 -04:00
Zheng, Lei
d1b6bb78d1 App/Gui: support Link refresh on change of originally linked configurable object 2022-03-26 10:19:20 -04:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
c4f5628899 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
2dc78804b6 Core: Fix several coverity issues:
* CID 350582: Big parameter passed by value
* CID 350639: Big parameter passed by value
* CID 305234: Uncaught exception
* CID 316529: Uncaught exception
* CID 350597: Uncaught exception
* CID 350623: Uncaught exception
* CID 332690: Uncaught exception
* CID 332700: Unchecked return value
* CID 350576: Uninitialized scalar field
* CID 350587: Uninitialized scalar variable
* CID 192606: Uninitialized scalar field
* CID 332699: Uninitialized pointer field
* CID 350561: Dereference null return value
* CID 350610: Dereference null return value
* CID 350567: Dereference after null check
2022-03-13 13:53:32 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
c613304473 [Gui] ViewProviderLink etc.: remove unused includes
- also put headers to PreCompiled.h
2022-03-06 01:11:42 +01:00
Uwe
dd5a681fd8 [Gui] remove unused headers 2022-02-19 03:41:28 +01:00
Uwe
c623e7d178 [Gui] ViewProviderLink: remove unused includes
- also sort them
2022-02-17 04:06:12 +01:00
Uwe
a94d4778ec [Gui] fix include sorting mistake from previous commit 2022-02-17 03:53:57 +01:00
Uwe
c17f118976 [Gui] add context menu icon for Std_TransformManip
- the other context menu entries have icons and we use this icon already in the Edit menu

- also sort the includes
2022-02-17 03:49:02 +01:00
luz paz
0042f58e4c Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
Chris Hennes
46a899c437 [Part] Coverity: dtors can't throw 2021-02-09 23:58:09 +01:00
luz paz
74ab516494 Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
473553a212 PVS: V595 A pointer was utilized before it was verified against nullptr 2020-07-18 10:59:28 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Zheng, Lei
35ba5aa2af Gui: improve ViewProviderLink transform editing 2020-01-07 07:37:28 -03:00
Zheng, Lei
1cbec1a60d Gui: fix Std_Transform tool
The problem is caused by tracking of editing object placement
introduced in 719c11e714.

After this commit, any editing object can disable placement tracking by
calling Gui::Document::setEditingTransform() inside either
ViewProvider::startEditing() or setEditingViewProvider().
2019-12-21 15:17:48 +01:00
Zheng, Lei
9ee436f27f Gui: fix ViewProviderLink::getElementPicked() when linked to group 2019-11-21 10:42:43 +01:00
luz.paz
1c981e8f14 Fix typos and misc. formatting [skip ci]
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-21 16:02:23 -03:00
wmayer
3006466a39 fix build failure with std::isdigit on Windows 2019-10-08 14:49:23 +02:00
Zheng, Lei
f55da93297 Gui: improve scale handling in SoFCCSysDragger
Because of the scale transformion in Link, the dragger may have
undesired behavior. This patch checks scaling factor in scenegraph
transformation, and auto scale the dragger axis accordingly.
2019-10-08 10:27:56 +02:00
Zheng, Lei
23d42421d8 Gui: fix ViewProviderLink dragger behavior with scale 2019-10-08 10:27:30 +02:00
Zheng, Lei
1833339359 App: add ScaleVector property to Link
This is a normally hidden property for non-uniform scaling
2019-10-08 10:23:05 +02:00
Zheng, Lei
92c00e7324 Gui: improve array element color override in ViewProviderLink 2019-10-08 10:22:31 +02:00
Zheng, Lei
f57283f598 Link: change sub-element linking mechanism
Previous multi-sub-element linking (e.g. Face, Edge) is supported
through SubElements of type PropertyStringList, which does not support
geometry element update tracking. This patch changes it to use
PropertyXLink's new multi-subname capability.
2019-10-08 10:20:50 +02:00
Zheng, Lei
45fd865fc0 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
Zheng, Lei
7a74093432 Replace use of Matrix.inverse() with inverseGauss()
Because of possible scaling involved.
2019-10-07 17:24:30 +02:00
Zheng, Lei
6663d625a9 Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
wmayer
b50b21576e 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