[TD]fix update suppression logic

This commit is contained in:
Wanderer Fan
2022-03-14 12:02:25 -04:00
committed by WandererFan
parent e7df102e22
commit aa4ba37a6c
5 changed files with 22 additions and 23 deletions

View File

@@ -321,12 +321,7 @@ void DrawPage::requestPaint(void)
//this doesn't work right because there is no guaranteed of the restoration order
void DrawPage::onDocumentRestored()
{
if (GlobalUpdateDrawings() &&
KeepUpdated.getValue()) {
updateAllViews();
} else if (!GlobalUpdateDrawings() &&
AllowPageOverride() &&
KeepUpdated.getValue()) {
if (canUpdate()) {
updateAllViews();
}
@@ -469,6 +464,20 @@ void DrawPage::handleChangedPropertyType(
}
}
bool DrawPage::canUpdate() const
{
bool result = false;
if (GlobalUpdateDrawings() &&
KeepUpdated.getValue()) {
result = true;
} else if (!GlobalUpdateDrawings() &&
AllowPageOverride() &&
KeepUpdated.getValue()) {
result = true;
}
return result;
}
//allow/prevent drawing updates for all Pages
bool DrawPage::GlobalUpdateDrawings(void)
{