Toponaming/Part: Cleanups, problem fixes, and tests

This commit is contained in:
bgbsww
2024-03-01 10:18:17 -05:00
parent 2adff99c14
commit 7945bf686e
13 changed files with 278 additions and 31 deletions

View File

@@ -723,6 +723,27 @@ void DocumentObject::onBeforeChange(const Property* prop)
signalBeforeChange(*this,*prop);
}
void DocumentObject::onEarlyChange(const Property *prop)
{
if(GetApplication().isClosingAll())
return;
if(!GetApplication().isRestoring() &&
!prop->testStatus(Property::PartialTrigger) &&
getDocument() &&
getDocument()->testStatus(Document::PartialDoc))
{
static App::Document *warnedDoc;
if(warnedDoc != getDocument()) {
warnedDoc = getDocument();
FC_WARN("Changes to partial loaded document will not be saved: "
<< getFullName() << '.' << prop->getName());
}
}
signalEarlyChanged(*this, *prop);
}
/// get called by the container when a Property was changed
void DocumentObject::onChanged(const Property* prop)
{