diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index 1c8a26fee..32c68eaa8 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -194,7 +194,7 @@ void DocumentObject::onBeforeChange(const Property* prop) // Store current name in oldLabel, to be able to easily retrieve old name of document object later // when renaming expressions. if (prop == &Label) - oldLabel = static_cast(&Label)->getStrValue(); + oldLabel = Label.getStrValue(); if (_pDoc) _pDoc->onBeforeChangeProperty(this,prop);