Commit Graph

1096 Commits

Author SHA1 Message Date
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
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