Commit Graph

1108 Commits

Author SHA1 Message Date
wmayer
8cf0bfa8bf App: [skip ci] avoid that Origin makes persistent any properties of its extension 2020-06-05 18:27:56 +02:00
wmayer
ab5467e835 App: [skip ci] implement the private class OriginExtension to simulate a geometric group behaviour 2020-06-05 18:24:17 +02:00
wmayer
f2bb7805f2 App: implement the private class OriginExtension to simulate a geometric group behaviour 2020-06-05 18:17:40 +02:00
Zheng, Lei
1f41f6f088 App: improve FunctionExpression forward compatibility
Remove runtime check when constructing FunctionExpression, in order to
support future built-in function. Exception will be thrown when
evaluating the expression to inform user about the error.
2020-06-03 22:18:39 +02:00
Zheng, Lei
7a47c54ad8 App: fix PropertyXLinkList/SubList::getValues() 2020-06-03 14:34:20 +02:00
Zheng, Lei
e55f5be44b App: fix PropertyXLink(Sub) python input/output 2020-06-03 14:34:20 +02:00
wmayer
be8634d05c Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
Syres916
13c3cedd67 [Gui] Material, Appearance, make Chrome colour..
..lighter and therefore more realistic. See discussion on French forum https://forum.freecadweb.org/viewtopic.php?f=12&t=46581
2020-05-25 13:38:30 +02:00
qingfengxia
768b1e718a FEM: fix unit for volumetric thermal exapnsion coefficient 2020-05-23 00:03:12 +02:00
wmayer
6c020f554d + fix Enumeration::contains: the current index is irrelevant when searching for an entry in the enumeration
+ only print a warning if the enumeration is not empty but the restored index is < 0
2020-05-19 08:45:02 +02:00
wmayer
939419fb29 App: [skip ci] remove duplicate check 2020-05-09 16:44:08 +02:00
Zheng, Lei
8030d56397 App: fix some property's setPathValue() 2020-05-09 16:36:33 +02:00
wmayer
70a51373a3 App: [skip ci] handle types long and unsigned long in PropertyFloat::setPathValue() 2020-04-27 12:44:54 +02:00
Zheng, Lei
d73c4ff144 App: fix lost of Link when renaming linked file 2020-04-27 11:24:29 +02:00
wandererfan
49177d0416 [App]convenience getter for PropertyXLinkList 2020-04-14 10:24:29 -04:00
wmayer
83bbf2ffa8 [skip ci] fix typos 2020-04-07 12:50:54 +02:00
luz.paz
ae72e2c762 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
a709ac2f03 App: [skip ci] handle types long and unsigned long in PropertyPlacement::setPathValue() 2020-04-03 12:02:46 +02:00
wmayer
acb29dead8 [skip ci] fix typos 2020-04-02 17:46:46 +02:00
Zheng, Lei
b2eef61a0b App: fix PropertyBool::setPathValue() 2020-04-01 13:28:05 +02:00
wmayer
a08435a53c App: add documentation to PropertyCleaner
move global variables static variables of PropertyCleaner
add unit test for removal of property in onBeforeChange
2020-03-21 18:33:08 +01:00
Zheng, Lei
d70ddf692e App: make deleting dynamic property safer
Dynamic property can be removed at any time, even during triggering of
onChanged() signal of the removing property. This patch introduced
static function Property::destroy() to make it safer by queueing any
removed property, and only deleting them when no onChanged() call is
active.
2020-03-21 15:43:03 +01:00
wmayer
5bfef75696 Base: [skip ci] add method to more easily set the Python error indicator from a Base::Exception 2020-03-18 17:53:13 +01:00
wmayer
77270b0ce8 App: GroupExtension::getGroupOfObject considers App::GroupExtension or App::GroupExtensionPython 2020-03-17 16:43:05 +01:00
wmayer
d4eb49c63c App: [skip ci] extend Python wrapper of hasExtension() to have full control over calling the C++ function 2020-03-17 14:03:14 +01:00
Bernd Hahnebach
a2ee671ad7 small code formating in application 2020-03-16 15:45:24 +01:00
wmayer
0a905d1f13 App: [skip ci] implement WekPtrT to simplify using DocumentObjectWeakPtrT 2020-03-16 15:11:11 +01:00
Zheng, Lei
570dd6cf5a 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
wmayer
bcae0c9139 App: [skip ci] reduce number of digits by 1 to display a NumberExpression
See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=44057
2020-03-11 10:31:28 +01:00
wmayer
cc9f1c5a1e [skip ci] App: print affected Python type if serializing via JSON fails
FemGui: add default implementations of __getstate__/__setstate__ to _ViewProviderFemResultMechanical
2020-03-10 16:32:31 +01:00
Zheng, Lei
2d1be0aa59 App: fix missing transformation in Link::getTrueLinkedObject() 2020-03-09 16:22:56 +01:00
luz.paz
ebe194a9e9 Fix typos
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,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-03-06 14:50:35 +01:00
Zheng, Lei
daf5cf5c21 App: fix Link appLinkExecute
Call hasAttr() first before getAttr().
2020-03-02 12:01:56 -03:00
wmayer
8e26c4a2df App: [skip ci] add further constructor to SubObjectT 2020-02-28 21:14:34 +01:00
plgarcia
59269207b4 Change backup policy
1 - Reports the error to the user in a popup.
2 - Names of the backups include the timstamp instead of a number. Names have more sense and the files can be sorted by names what is also the age order.
3 - Behaviors when changing configuration improved, the number of files present on the system was not reduced when reducing the number of backups or backups deactivated.
2020-02-24 23:06:26 +01:00
wmayer
2336d1be8d App: refactor code to support various backup policies 2020-02-24 23:06:26 +01:00
wmayer
454fe91c3c App/Gui: implement a lightweight weak_ptr like class to work with Document, DocumentObject and ViewProvider 2020-02-19 19:58:34 +01:00
Zheng, Lei
a66ebdce9f App: restore external linked documents in dependency order 2020-02-14 19:46:56 +01:00
Zheng, Lei
72833466a0 App: do not save external dependency 2020-02-14 19:46:47 +01:00
Zheng, Lei
51cf93012f App: fix Link document restore
This fixes issue #0004224
2020-02-14 19:46:36 +01:00
Zheng, Lei
6603bd78fe 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
Stefan Tröger
7b79012ae1 Implement and test extension events 2020-02-13 14:39:46 +01:00
Zheng, Lei
b50914923a App: add class TransactionLocker
To protect some critical transaction from being closed prematurely. It
is currently used to protect transaction of object deletion.
2020-02-11 15:40:27 -05:00
Zheng, Lei
12690fb566 Gui: refactor link property editor
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.
2020-02-11 15:40:27 -05:00
Zheng, Lei
8fd53f4f75 App: add PropertyXLinkList
PropertyXLinkList is derived from PropertyXLinkSubList, which is
modified to provide APIs compatible to PropertyLinkList.

The only difference between the two class is in their getPyObject() to
make PropertyXLinkList output similar to PropertyLinkList in Python. In
C++, both class can accept mix of objects link with or without subname,
depending on which set of APIs are used.
2020-02-11 15:40:27 -05:00
Zheng, Lei
6922b83674 App: fix PropertyXLink invalid external link 2020-02-11 15:40:27 -05:00
Zheng, Lei
b0cefd91e8 App: fix PropertyLinkSub(List) unicode handling 2020-02-11 15:40:27 -05:00
Zheng, Lei
dc52336749 App: remove unncessary exception catch
This allows exception to propagate to generated C++ python extension
class code.
2020-02-11 15:40:27 -05:00
Zheng, Lei
e4978be7a4 App: add new convenient class SubObjectT
Derived from App::DocumentObjectT to add support of sub object

Also some minor changes to App::DocumentObjectT

Changed Gui::SelectionChanges to make use of SubObjectT
2020-02-11 15:40:27 -05:00
Zheng, Lei
10e7b3e80e Do not throw error when open an already opened document 2020-02-05 11:12:00 +01:00