Fix and test the new signals

This commit is contained in:
ickby
2018-09-09 15:08:24 +02:00
committed by wmayer
parent 65d6d5cc33
commit 617114a072
4 changed files with 212 additions and 7 deletions

View File

@@ -962,7 +962,7 @@ void Document::openTransaction(const char* name)
else
d->activeUndoTransaction->Name = "<empty>";
signalOpenTransaction(*this, name);
signalOpenTransaction(*this, d->activeUndoTransaction->Name);
}
}
@@ -1140,8 +1140,8 @@ void Document::onChanged(const Property* prop)
void Document::onBeforeChangeProperty(const TransactionalObject *Who, const Property *What)
{
if(Who->isDerivedFrom(App::DocumentObject::getClassTypeId())
signalBeforeChangeObject(*static_cast<App::DocuemntObject*>(Who), *What);
if(Who->isDerivedFrom(App::DocumentObject::getClassTypeId()))
signalBeforeChangeObject(*static_cast<const App::DocumentObject*>(Who), *What);
if (d->activeUndoTransaction && !d->rollback)
d->activeUndoTransaction->addObjectChange(Who,What);
@@ -2252,7 +2252,7 @@ int Document::recompute()
if ((*objIt)->isTouched() || doRecompute) {
(*objIt)->purgeTouched();
signalObjectRecomputed(*(*objOt));
signalRecomputedObject(*(*objIt));
// force recompute of all dependent objects
for (auto inObjIt : (*objIt)->getInList())
inObjIt->enforceRecompute();
@@ -2522,8 +2522,10 @@ void Document::recomputeFeature(DocumentObject* Feat)
_RecomputeLog.clear();
// verify that the feature is (active) part of the document
if (Feat->getNameInDocument())
if (Feat->getNameInDocument()) {
_recomputeFeature(Feat);
signalRecomputedObject(*Feat);
}
}
DocumentObject * Document::addObject(const char* sType, const char* pObjectName, bool isNew)