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
wmayer
8e4494c5c2
App: add methods to change import/export module of a registered filetype
2020-01-18 15:29:44 +01:00
wmayer
0b9626cf61
Py2: [skip ci] provide time._process_time
2020-01-18 12:21:00 +01:00
wmayer
482723851e
fix const correctness
2020-01-13 02:30:39 +01:00
wandererfan
58db711ff5
[App]add isEmpty method to PropertyFileIncluded
...
- for consistency with PropertyFile
2020-01-12 11:38:53 -05:00
donovaly
d1b354fc6b
add units Gauss, Weber and Oersted
2020-01-07 07:36:22 -03:00
donovaly
fcffd48dd4
ExpressionParser.l: fix a typo
2020-01-05 15:00:46 +01:00
donovaly
68ea38cc8d
add the units Ohm and Siemens
2020-01-05 15:00:46 +01:00
Zheng, Lei
9d66dbbbbf
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
019f73852c
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
95e852051e
[skip ci] MPH already defined
2019-12-24 13:33:38 +01:00
donovaly
3da00267cf
cosmetics to keep the overview
2019-12-24 13:31:00 +01:00
donovaly
b255475d7c
missing parts from from commit 33b8054228
...
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
donovaly
a6a043a6f2
also add unit THz as requested
2019-12-23 16:49:45 +01:00
donovaly
edd97de6a2
add units Mpsi, cal and kcal
...
- also ass missing parts from commit 0021efbf
2019-12-23 16:49:45 +01:00
wmayer
9746106740
Gui: allow to set font family and size and syntax highlighting
2019-12-19 23:17:46 +01:00
donovaly
26196ae612
add mJ and kW
...
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
94bae36cee
add the following units:
...
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
luz.paz
d10ca28c88
LGTM: remove unnecessary 'pass' statements
...
Issue: A pass statement is only necessary when it is the only statement in a block (the list of statements forming part of a compound statement). This is because the purpose of the pass statement is to allow empty blocks where they would otherwise be syntactically invalid. If the block already contains other statements then the pass statement is unnecessary.
Recommendation: Remove the pass statement.
Relevant links:
1a82a5e136/files/src/Mod/Import/stepZ.py (x78f479c31a062553) :1
1a82a5e136/files/src/Mod/OpenSCAD/OpenSCADCommands.py (xad4868ffcdf82498) :1
1a82a5e136/files/src/App/FreeCADInit.py (x9034ec6815c48e38) :1
2019-12-17 15:15:53 -03:00
luz.paz
cc97145e9d
Fix various typos [skip ci]
...
Fixed 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-12-17 15:13:48 -03:00
wmayer
696719f3a1
Add GUI command to insert a text document into the active document
2019-12-11 16:01:31 +01:00