Commit Graph

34 Commits

Author SHA1 Message Date
wmayer
7db925d991 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
luz paz
a0c0b2616c Fix various typos 2022-06-01 18:03:40 -04:00
wmayer
3bea43a228 App: cannot assign a null pointer to a std::string
Depending on the compiler an exception is raised or a crash occurs
2022-05-06 15:14:37 +02:00
Zheng, Lei
15e1556f97 App: handle exception on change Link CopyOnChange 2022-05-05 11:37:38 -05:00
Chris Hennes
132a1d7e55 App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
Zheng, Lei
97deadf437 App: minor change to LinkParams 2022-03-26 10:19:20 -04: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
749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
Uwe
07912f7388 [App] Link and Material: remove unused includes 2022-02-27 21:23:51 +01:00
wmayer
f147986fa9 App: Bugfix for NULL-Pointer dereference of Property->getName() 2022-01-16 14:30:51 +01:00
Zheng, Lei
4f29e81d0c App: support CopyOnChange property in Link
New property status bit 'CopyOnChange' is added for any document object
to publish any property as a 'Configuration' option. When Link is
linked to any object with such property, it will duplicate those
properties and added it Link itself as dynamic properties. If the user
changes any of these dynamic properties, the Link will auto copy the
linked to object and apply the new configuration to it.

The Link has a new property 'LinkCopyOnChange' to allow user to
enable/disable this feature.

Spreadsheet's 'Configuration Table' feature will publish its
configuration property with 'CopyOnChange'.

Currently, once the linked object is copied, it will be independent with
the original object. There is no mechanism to auto sync changes back to
the copy.
2021-12-21 21:41:02 -07:00
Chris Hennes
186548da6c [App] LGTM fix - rename loop variable
LGTM complains that the use of "obj" as the loop variable here hides the
parameter "obj". To silence the warning, rename the loop variable.
2021-09-18 23:18:51 -05:00
Zheng, Lei
54171f6b04 App: fix LinkMode enforcement in Link on restore 2021-08-01 16:36:12 +08:00
Zheng, Lei
c5ce992786 App: fix Link extensionGetPropertyByName()
Do not query linked object if the owner object has property with the
given name.
2021-02-07 14:49:49 +01:00
luz paz
bfdffb50be App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +01:00
wmayer
d13a187a6f App: [skip ci] Coverity: 'Constant' variable guards dead code 2020-09-14 19:06:27 +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
wmayer
0a8c6e36a1 [skip ci] include missing boost header 2020-06-07 15:54:34 +02:00
Zheng, Lei
d2d27e9e79 App: change Link array behavior
Do not behave as group when Link array is collapsed (i.e. ShowElement
is false)
2020-03-15 10:57:19 +01:00
Zheng, Lei
d4e07199e9 App: fix missing transformation in Link::getTrueLinkedObject() 2020-03-09 16:22:56 +01:00
Zheng, Lei
27eb8bebeb App: fix Link appLinkExecute
Call hasAttr() first before getAttr().
2020-03-02 12:01:56 -03:00
Zheng, Lei
e97336f214 App: add proxy execute support to Link
While executing, Link will look for a special Python callable defined in
the linked proxy object, and run it. This allows for customized link
behavior without defining a specialized Link.
2020-02-14 14:17:14 +01:00
wmayer
7758509bda fix and suppress some more -Wgnu-zero-variadic-macro-arguments 2019-11-15 23:53:09 +01:00
Zheng, Lei
2896791376 App: fix getSubObject() in Link
Do not include scale in transformation output in
LinkBaseExtension::extensionGetSubObject()
2019-10-08 10:26:29 +02:00
Zheng, Lei
0d181d0dde App: allow link properties for all App::Link 2019-10-08 10:23:42 +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
998f801d37 App: migrate old SubElements in Link 2019-10-08 10:21:19 +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
luz.paz
7b7797f4f3 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
Zheng, Lei
9d03d7caa9 App: fix LinkBaseExtension::extensionGetSubObject()
This fix obtain shape from a link to a sub element
2019-08-30 14:42:19 +02:00
Zheng, Lei
aaf0f2c80d Link: rename _LinkRecomputed to _LinkTouched 2019-08-17 15:32:48 +02:00
Zheng, Lei
2a6bd5e464 Implementation of Link
This patch includes the actual implementation of Link, which is
implemented as an extension named LinkBaseExtension in App namespace,
and a full view provider ViewProviderLink in Gui. The reason of not
using ViewProviderExtension is because it need full control when
display, not just extending existing functionalities.

Please see [here](https://git.io/fjPue) for more details of the
implementation.

This patch also includes a set of link manipulation commands, and a
task panel for overriding geometry element colors.
2019-08-17 15:08:33 +02:00