Commit Graph

1098 Commits

Author SHA1 Message Date
wmayer
bdea1ec0f6 App: [skip ci] remove duplicate check 2020-05-09 16:44:08 +02:00
Zheng, Lei
9c4c8acb6e App: fix some property's setPathValue() 2020-05-09 16:36:33 +02:00
wmayer
1a3285219a App: [skip ci] handle types long and unsigned long in PropertyFloat::setPathValue() 2020-04-27 12:44:54 +02:00
Zheng, Lei
7069d9abb8 App: fix lost of Link when renaming linked file 2020-04-27 11:24:29 +02:00
wandererfan
30e07229e1 [App]convenience getter for PropertyXLinkList 2020-04-14 10:24:29 -04:00
wmayer
ce35c641b5 [skip ci] fix typos 2020-04-07 12:50:54 +02:00
luz.paz
d36c3ebe57 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
919b414dcb App: [skip ci] handle types long and unsigned long in PropertyPlacement::setPathValue() 2020-04-03 12:02:46 +02:00
wmayer
b5d7ac6438 [skip ci] fix typos 2020-04-02 17:46:46 +02:00
Zheng, Lei
937b331802 App: fix PropertyBool::setPathValue() 2020-04-01 13:28:05 +02:00
wmayer
6008aa3ae3 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
d441a9ded5 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
49bfbf73f8 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
0f86afa019 App: GroupExtension::getGroupOfObject considers App::GroupExtension or App::GroupExtensionPython 2020-03-17 16:43:05 +01:00
wmayer
8401b563da 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
381269a0c8 small code formating in application 2020-03-16 15:45:24 +01:00
wmayer
949110d73d App: [skip ci] implement WekPtrT to simplify using DocumentObjectWeakPtrT 2020-03-16 15:11:11 +01: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
wmayer
338bf2ca3a 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
75b9dd8a0e [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
d4e07199e9 App: fix missing transformation in Link::getTrueLinkedObject() 2020-03-09 16:22:56 +01:00
luz.paz
180805c55e 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
27eb8bebeb App: fix Link appLinkExecute
Call hasAttr() first before getAttr().
2020-03-02 12:01:56 -03:00
wmayer
549b424e1f App: [skip ci] add further constructor to SubObjectT 2020-02-28 21:14:34 +01:00
plgarcia
d222f7b55f 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
9466fdff9e App: refactor code to support various backup policies 2020-02-24 23:06:26 +01:00
wmayer
b34f0aef34 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
27771fc6ee App: restore external linked documents in dependency order 2020-02-14 19:46:56 +01:00
Zheng, Lei
5eb15e4219 App: do not save external dependency 2020-02-14 19:46:47 +01:00
Zheng, Lei
0a608e9413 App: fix Link document restore
This fixes issue #0004224
2020-02-14 19:46:36 +01: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
Stefan Tröger
52c64d8a85 Implement and test extension events 2020-02-13 14:39:46 +01:00
Zheng, Lei
c4be6c8b23 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
0633abb70d 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
3364911d6d 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
e4a2d9fc42 App: fix PropertyXLink invalid external link 2020-02-11 15:40:27 -05:00
Zheng, Lei
e707ba8348 App: fix PropertyLinkSub(List) unicode handling 2020-02-11 15:40:27 -05:00
Zheng, Lei
c182425ecd 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
39959f9500 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
992dc49ece Do not throw error when open an already opened document 2020-02-05 11:12:00 +01:00
wmayer
120b69c74f App: add methods to change import/export module of a registered filetype 2020-01-18 15:29:44 +01:00
wmayer
6866397c14 Py2: [skip ci] provide time._process_time 2020-01-18 12:21:00 +01:00
wmayer
09727b9f11 fix const correctness 2020-01-13 02:30:39 +01:00
wandererfan
60c1855d12 [App]add isEmpty method to PropertyFileIncluded
- for consistency with PropertyFile
2020-01-12 11:38:53 -05:00
donovaly
66354b3c58 add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
ca07b05fab ExpressionParser.l: fix a typo 2020-01-05 15:00:46 +01:00
donovaly
05dadb4c75 add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
Zheng, Lei
d5a4996d25 App: fix Expression _moveCells()
The problem is caused by not refreshing ObjectIdentifier internal cache
after change.
2019-12-31 15:23:03 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
wmayer
72065b0d39 [skip ci] MPH already defined 2019-12-24 13:33:38 +01:00