Commit Graph

993 Commits

Author SHA1 Message Date
wmayer
1a2370cd91 do not use an int but an enum to handle different modes 2019-09-27 22:00:25 +02:00
Zheng, Lei
b450f5a5c8 App: improve exception handling in FeaturePython 2019-09-27 18:02:20 +02:00
Zheng, Lei
0f29155502 App/Gui: unify NotImplementedError handling in python features
Recognize NotImplementedError as an indication to call the C++
implementation.
2019-09-27 18:01:54 +02:00
lorenz
145e3a60f8 add missing include to Precompiled.h 2019-09-25 20:06:36 +02:00
wandererfan
81d2ff358d [App][Gui]Add Filter for PropertyFile in PropertyEditor 2019-09-20 07:56:52 -04:00
wmayer
6d5ebdeafc fix some MSVC warnings 2019-09-19 17:55:10 +02:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
503f987cf6 Add virtual method allowOverrideViewProviderName to DocumentObject to indicate if a DocumentObject's view provider type can be overriden.
For most object types this is not allowed to avoid to create incompatible combinations via Python or manipulated project files and possibly provoke crashes.

For more details see also: https://forum.freecadweb.org/viewtopic.php?f=10&t=38970&p=333951#p333951
2019-09-14 00:52:09 +02:00
wmayer
b17bda5a2f fix regression caused by commit 5e42d4830 2019-09-13 13:08:48 +02:00
Zheng, Lei
fd0f4f5654 Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
Zheng, Lei
5e42d48308 App: improve document::readObjects() 2019-09-10 14:17:06 +02:00
luz.paz
a1984aeece Fix typos, grammar, and some whitespace issues
Found via `codespell -q 2 -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-09-07 11:58:38 -04:00
wmayer
4289a98af4 minor change 2019-09-07 17:08:40 +02:00
Zheng, Lei
2fc05e2f0d App: check active document before revert in Document::restore() 2019-09-07 17:00:25 +02:00
Zheng, Lei
84f2cc4a17 App: call setActiveDocument when reverting document 2019-09-07 17:00:03 +02:00
wmayer
12e92fef31 encode keys of PropertyMap when saving as XML 2019-09-05 18:51:35 +02:00
Dietmar Czekay
c3f0288ea5 add VacuumPermittivity and fix adding user values to material editor in FEM 2019-09-04 11:29:09 -03:00
wmayer
bc4a220ad1 remove unused variable 2019-09-03 17:21:16 +02:00
Jean-Marie Verdun
c4b0073022 Fix copyright 2019-09-03 17:21:11 +02:00
Jean-Marie Verdun
ee530a4634 Fix some copyright issues reported by luzpaz
Fix some typos reported by kkremitzi
Remove resetTouched which was dead code following update on Document management
2019-09-03 17:21:08 +02:00
Jean-Marie Verdun
27e7b9913a Add initial version of the Cloud workbench 2019-09-03 17:21:05 +02:00
luz.paz
f22ae848ea Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
f66e7f3332 App: remove unused variable 2019-08-30 15:52:18 +02:00
Zheng, Lei
4f383de1f5 App: ignore unit in PropertyBool/Float/Integer
In other word, those property now accept expression result with a unit,
by ignoring it.
2019-08-30 15:50:26 +02:00
Zheng, Lei
9ec86fad4e App: improve exception message in PropertyExpressionEngine 2019-08-30 15:50:13 +02:00
Zheng, Lei
02df227c1c App: fix virtual function shadowing in PropertyXLinkSub 2019-08-30 15:49:41 +02:00
Zheng, Lei
31273bc1c6 App: more sanity check in PropertyContainerPy 2019-08-30 15:46:47 +02:00
Zheng, Lei
783d218b1d App: more sanity check in ObjectIdentifier 2019-08-30 15:46:33 +02:00
Zheng, Lei
0cb599a31c App: do not return null Shape in PropertyContainerPy 2019-08-30 15:45:58 +02:00
Zheng, Lei
04d678571c App: fix Python object leak in ObjectIdentifier 2019-08-30 15:45:44 +02:00
Zheng, Lei
88a1a9482e App: fix crash on accessing non-existent attribute in ObjectIdentifier 2019-08-30 15:45:28 +02:00
Zheng, Lei
d16cd4f631 App: fix Document::_abortTransaction() 2019-08-30 14:55:49 +02:00
Zheng, Lei
278e933527 App: allow starting '_' in an expression identifier
It's a signle line change in the flex source, bug a big change in the
generated source.
2019-08-30 14:47:53 +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
b78f1a5111 App: make recompute aborting optional 2019-08-30 14:41:46 +02:00
Zheng, Lei
75385d7f34 App: prevent recursive abort/commitTransaction 2019-08-30 14:35:23 +02:00
wmayer
218d849355 use GNU directory structure on non-Windows systems 2019-08-22 16:57:11 +02:00
wmayer
12dc2e9146 work around to fix build failure with clang 3.4 2019-08-20 14:24:27 +02:00
wmayer
3e6ae0d027 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-private-field
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:51:51 +02:00
wmayer
9c69c886a4 fix MSVC compiler warnings 2019-08-17 19:35:21 +02:00
Zheng, Lei
0a2d8dc5ca App: do not throw on recursive recompute 2019-08-17 15:32:51 +02:00
Zheng, Lei
54a8136d5c App: fix rollback of dynamic property changes 2019-08-17 15:32:51 +02:00
Zheng, Lei
d0ca893b3e Command: disable auto transaction if triggering editing
Each command will create an App::AutoTransaction to auto create and
commit a transaction for proper undo/redo. But if the command starts
editing, the current transaction may be required to out live the current
command.

Note that the command can only detect editing if the code calls
Gui::Document::setEdit(). There are objects that starts editing by
calling its own ViewProvider::setEdit(), e.g. various TechDraw
ViewProviders. In this case, to avoid auto committing, one can call
App::Application::setActiveTransaction() with the second argument set to
true, or call App::AutoTransaction::setEnable(false).
2019-08-17 15:32:51 +02:00
Zheng, Lei
a228f3c11b App: fix xml indentation in PropertyContainer::Save 2019-08-17 15:32:50 +02:00
Zheng, Lei
5a96db6483 App: fix property type matching in transaction 2019-08-17 15:32:50 +02:00
Zheng, Lei
d3500ecfab App: fix Python object leak in PropertyListT
* Fix Python object leak in _setPyObject()
* Add support for Python iterables
* Minor performance improvement on setPyValues()
2019-08-17 15:32:49 +02:00
Zheng, Lei
3fcb3e677a PropertyContainer: skip saving trasient dynamic property 2019-08-17 15:32:49 +02:00
Zheng, Lei
ce30645b39 Fix typos pathes -> paths 2019-08-17 15:32:49 +02:00
luz.paz
4aba7e2f5a Fix more typos 2019-08-17 15:32:49 +02:00
luz.paz
ef2947dce6 Fix extra grammar issue in src/App 2019-08-17 15:32:49 +02:00