minor fixes

This commit is contained in:
wmayer
2018-10-08 12:27:03 +02:00
parent fc91ba8ad9
commit addb742b3c
5 changed files with 21 additions and 19 deletions

View File

@@ -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<std::string, std::string> 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);

View File

@@ -129,9 +129,9 @@ public:
*/
//@{
/// signal before change of doc property
boost::signal<void (const App::Document&, const App::Property&)> signalBeforeChangeDoc;
boost::signal<void (const App::Document&, const App::Property&)> signalBeforeChangeDocument;
/// signal on changed doc proeprty
boost::signal<void (const App::Document&, const App::Property&)> signalChangedDoc;
boost::signal<void (const App::Document&, const App::Property&)> signalChangedDocument;
/// signal on new Object
boost::signal<void (const App::DocumentObject&)> signalNewObject;
//boost::signal<void (const App::DocumentObject&)> 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);

View File

@@ -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();

View File

@@ -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

View File

@@ -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