Commit Graph

28 Commits

Author SHA1 Message Date
wmayer
bb73b571f7 App/Gui: fix possible crash when destroying Python feature or its view provider 2021-02-17 12:00:38 +01:00
wmayer
23059c13d3 PyCXX: [skip ci] fix compiler warnings due to changes on PyCXX 2020-11-25 16:52:46 +01:00
luz paz
84553bf191 App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +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
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
Zheng, Lei
2df3052ecf Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
wmayer
3f8ec4b9e9 do not use an int but an enum to handle different modes 2019-09-27 22:00:25 +02:00
Zheng, Lei
d1b5e07eee App: improve exception handling in FeaturePython 2019-09-27 18:02:20 +02:00
Zheng, Lei
d3dea0178d 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
wmayer
1cdd2d166f 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
Zheng, Lei
ad57821cf9 Python feature/observer related changes
* Add new API and signal handler in document observer

* Pre initialize python handler function to improve performance. In
  case Python code use dynamic patching, i.e. add class method at
  runtime (which is rare and should be discouraged), the python feature
  can be re-initialized by simply assign proeprty Proxy again.

* Add property tracking in DocumentObjectT

* WidgetFactory adds support for accepting python QIcon, which is used
  by ViewProviderPythonFeature
2019-08-17 15:08:34 +02:00
wmayer
8a16eec936 fixes #0003424: 'basic_string::_M_construct null not valid' when opening a v0.16 project with v0.17 2018-04-10 10:51:34 +02:00
Eivind Kvedalen
8b4adfa513 Moved ObjectStatusLocker template class to Base/Tools.h 2017-11-30 16:28:41 +01:00
wmayer
4d63e9a4c4 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
e4770ffa9e protect document against nested recomputes
+ convert ObjectStatusLocker into a template class to make its usage more flexible
+ add status flag 'Recomputing' and set in Document::recompute to detect and avoid nested calls of recompute
2017-07-17 18:24:10 +02:00
wmayer
01065b76d5 expose recompute() of document object to Python 2016-11-19 16:24:11 +01:00
wmayer
b5cbaae73a move handling of dynamic properties from FeaturePythonPyT to DocumentObjectPy 2016-11-09 16:09:21 +01:00
wmayer
a83e09d6e2 + expose onDocumentRestored to Python feature classes 2016-01-05 19:05:48 +01:00
wmayer
35edaa7e5a + support of Python feature classes without an execute() method
+ if execute() method of Python feature is missing or if it returns false call the execute() method of the C++ feature
+ fix SketchObjectPython
2015-10-21 00:22:40 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
e05c64d8f2 + exposing onBeforeChange to Python 2014-12-01 10:58:25 +01:00
wmayer
419664e0ea + restore lost changes, improve whitspaces, suppress useless MSVC warnings 2014-08-28 12:37:42 +02:00
jriegel
d0d832896a Merge remote-tracking branch 'refs/remotes/origin/jriegel/NewWinBuild' into jriegel/review-NewLibPack
Conflicts:
	src/3rdParty/salomesmesh/CMakeLists.txt
2014-08-27 15:39:00 +02:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
jriegel
d46e0d0cb6 some type clearification 2014-08-21 17:59:33 +02:00
wmayer
3a591b3a94 Improve reporting of Python exceptions 2013-05-04 14:23:53 +02:00
wmayer
605e85b952 Make FeaturePython Python binding a template class to avoid code duplication 2013-03-22 00:34:18 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00