remove properties from transactions when being deleted

This commit is contained in:
wmayer
2017-08-28 21:20:17 +02:00
parent 3a0ea0df8e
commit a5bf15b55d
13 changed files with 64 additions and 8 deletions

View File

@@ -94,6 +94,15 @@ const char* ViewProviderDocumentObject::detachFromDocument()
return "";
}
void ViewProviderDocumentObject::onAboutToRemoveProperty(const char* prop)
{
// transactions of view providers are also managed in App::Document.
App::DocumentObject* docobject = getObject();
App::Document* document = docobject ? docobject->getDocument() : nullptr;
if (document)
document->removePropertyOfObject(this, prop);
}
void ViewProviderDocumentObject::onBeforeChange(const App::Property* prop)
{
if (isAttachedToDocument()) {