Expose onBeforeChange to python document observer

This commit is contained in:
ickby
2017-08-15 06:26:26 +02:00
committed by wmayer
parent e338fe6b70
commit 65d6d5cc33
6 changed files with 42 additions and 0 deletions

View File

@@ -1140,6 +1140,9 @@ 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 (d->activeUndoTransaction && !d->rollback)
d->activeUndoTransaction->addObjectChange(Who,What);
}