diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 48732257cf..bb415fa1e2 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -416,8 +416,8 @@ Document* Application::newDocument(const char * Name, const char * UserName) // connect the signals to the application for the new document - _pActiveDoc->signalBeforeChange.connect(boost::bind(&App::Application::slotBeforeChangeDoc, this, _1, _2)); - _pActiveDoc->signalChanged.connect(boost::bind(&App::Application::slotChangedDoc, this, _1, _2)); + _pActiveDoc->signalBeforeChange.connect(boost::bind(&App::Application::slotBeforeChangeDocument, this, _1, _2)); + _pActiveDoc->signalChanged.connect(boost::bind(&App::Application::slotChangedDocument, this, _1, _2)); _pActiveDoc->signalNewObject.connect(boost::bind(&App::Application::slotNewObject, this, _1)); _pActiveDoc->signalDeletedObject.connect(boost::bind(&App::Application::slotDeletedObject, this, _1)); _pActiveDoc->signalBeforeChangeObject.connect(boost::bind(&App::Application::slotBeforeChangeObject, this, _1, _2)); @@ -980,14 +980,14 @@ std::map Application::getExportFilters(void) const //************************************************************************** // signaling -void Application::slotBeforeChangeDoc(const App::Document& doc, const Property& prop) +void Application::slotBeforeChangeDocument(const App::Document& doc, const Property& prop) { - this->signalBeforeChangeDoc(doc, prop); + this->signalBeforeChangeDocument(doc, prop); } -void Application::slotChangedDoc(const App::Document& doc, const Property& prop) +void Application::slotChangedDocument(const App::Document& doc, const Property& prop) { - this->signalChangedDoc(doc, prop); + this->signalChangedDocument(doc, prop); } void Application::slotNewObject(const App::DocumentObject&O) @@ -1029,6 +1029,7 @@ void Application::slotRedoDocument(const App::Document& d) { this->signalRedoDocument(d); } + void Application::slotRecomputedObject(const DocumentObject& obj) { this->signalObjectRecomputed(obj); diff --git a/src/App/Application.h b/src/App/Application.h index 73c98ce451..ed367b1d5c 100644 --- a/src/App/Application.h +++ b/src/App/Application.h @@ -129,9 +129,9 @@ public: */ //@{ /// signal before change of doc property - boost::signal signalBeforeChangeDoc; + boost::signal signalBeforeChangeDocument; /// signal on changed doc proeprty - boost::signal signalChangedDoc; + boost::signal signalChangedDocument; /// signal on new Object boost::signal signalNewObject; //boost::signal m_sig; @@ -280,8 +280,8 @@ protected: * This slot get connected to all App::Documents created */ //@{ - void slotBeforeChangeDoc(const App::Document&, const App::Property&); - void slotChangedDoc(const App::Document&, const App::Property&); + void slotBeforeChangeDocument(const App::Document&, const App::Property&); + void slotChangedDocument(const App::Document&, const App::Property&); void slotNewObject(const App::DocumentObject&); void slotDeletedObject(const App::DocumentObject&); void slotBeforeChangeObject(const App::DocumentObject&, const App::Property& Prop); diff --git a/src/App/Document.cpp b/src/App/Document.cpp index cb6db954dc..da196c18f6 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -1098,8 +1098,8 @@ unsigned int Document::getMaxUndoStackSize(void)const return d->UndoMaxStackSize; } -void Document::onBeforeChange(const Property* prop) { - +void Document::onBeforeChange(const Property* prop) +{ signalBeforeChange(*this, *prop); } @@ -2255,11 +2255,12 @@ int Document::recompute() // if something happened break execution of recompute return -1; } + + signalRecomputedObject(*(*objIt)); } if ((*objIt)->isTouched() || doRecompute) { (*objIt)->purgeTouched(); - signalRecomputedObject(*(*objIt)); // force recompute of all dependent objects for (auto inObjIt : (*objIt)->getInList()) inObjIt->enforceRecompute(); diff --git a/src/App/DocumentObserverPython.cpp b/src/App/DocumentObserverPython.cpp index c567dcb418..2dcbd7138d 100644 --- a/src/App/DocumentObserverPython.cpp +++ b/src/App/DocumentObserverPython.cpp @@ -72,9 +72,9 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj this->connectApplicationRedoDocument = App::GetApplication().signalRedoDocument.connect(boost::bind (&DocumentObserverPython::slotRedoDocument, this, _1)); - this->connectDocumentBeforeChange = App::GetApplication().signalBeforeChangeDoc.connect(boost::bind + this->connectDocumentBeforeChange = App::GetApplication().signalBeforeChangeDocument.connect(boost::bind (&DocumentObserverPython::slotBeforeChangeDocument, this, _1, _2)); - this->connectDocumentChanged = App::GetApplication().signalChangedDoc.connect(boost::bind + this->connectDocumentChanged = App::GetApplication().signalChangedDocument.connect(boost::bind (&DocumentObserverPython::slotChangedDocument, this, _1, _2)); this->connectDocumentCreatedObject = App::GetApplication().signalNewObject.connect(boost::bind (&DocumentObserverPython::slotCreatedObject, this, _1)); @@ -84,19 +84,19 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj (&DocumentObserverPython::slotBeforeChangeObject, this, _1, _2)); this->connectDocumentChangedObject = App::GetApplication().signalChangedObject.connect(boost::bind (&DocumentObserverPython::slotChangedObject, this, _1, _2)); - + this->connectDocumentObjectRecomputed = App::GetApplication().signalObjectRecomputed.connect(boost::bind (&DocumentObserverPython::slotRecomputedObject, this, _1)); this->connectDocumentRecomputed = App::GetApplication().signalRecomputed.connect(boost::bind (&DocumentObserverPython::slotRecomputedDocument, this, _1)); - + this->connectDocumentOpenTransaction = App::GetApplication().signalOpenTransaction.connect(boost::bind (&DocumentObserverPython::slotOpenTransaction, this, _1, _2)); this->connectDocumentCommitTransaction = App::GetApplication().signalCommitTransaction.connect(boost::bind (&DocumentObserverPython::slotCommitTransaction, this, _1)); this->connectDocumentAbortTransaction = App::GetApplication().signalAbortTransaction.connect(boost::bind (&DocumentObserverPython::slotAbortTransaction, this, _1)); - + this->connectObjectAppendDynamicProperty = App::GetApplication().signalAppendDynamicProperty.connect(boost::bind (&DocumentObserverPython::slotAppendDynamicProperty, this, _1)); this->connectObjectRemoveDynamicProperty = App::GetApplication().signalRemoveDynamicProperty.connect(boost::bind diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index fd5269c812..1cfa30980d 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -152,7 +152,7 @@ Document::Document(App::Document* pcDocument,Application * app) (boost::bind(&Gui::Document::exportObjects, this, _1, _2)); d->connectImportObjects = pcDocument->signalImportViewObjects.connect (boost::bind(&Gui::Document::importObjects, this, _1, _2, _3)); - + d->connectUndoDocument = pcDocument->signalUndo.connect (boost::bind(&Gui::Document::slotUndoDocument, this, _1)); d->connectRedoDocument = pcDocument->signalRedo.connect