Spreadsheet: fix owner property reference in PropertySheet

PropertySheet used to only work when refereceing its own cell either
through cell address or alias. It does not work for reference to other
property of the owner Spreadsheet object.
This commit is contained in:
Zheng, Lei
2022-03-16 10:08:17 +08:00
committed by Chris Hennes
parent d1b6bb78d1
commit 8d97b2bcb8
2 changed files with 10 additions and 2 deletions

View File

@@ -1291,7 +1291,14 @@ void PropertySheet::invalidateDependants(const App::DocumentObject *docObj)
}
}
void PropertySheet::slotChangedObject(const App::DocumentObject &obj, const App::Property &prop) {
void PropertySheet::slotChangedObject(const App::DocumentObject &obj, const App::Property &prop)
{
if (&obj == getContainer()) {
if (&prop == this || !prop.getName() || revAliasProp.count(prop.getName()))
return;
if (stringToAddress(prop.getName(), true).isValid())
return;
}
recomputeDependants(&obj, prop.getName());
}