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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -1568,7 +1568,8 @@ void Sheet::onChanged(const App::Property *prop) {
|
||||
for(auto &range : tmp)
|
||||
rangeUpdated(range);
|
||||
}
|
||||
|
||||
else
|
||||
cells.slotChangedObject(*this, *prop);
|
||||
App::DocumentObject::onChanged(prop);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user