Fix deferred window invalidations not redrawng window

This commit is contained in:
Jonathan G Rennison
2021-04-10 21:32:58 +01:00
parent f39b6f4ba3
commit f3164b6ef4

View File

@@ -3335,10 +3335,11 @@ void SetWindowClassesDirty(WindowClass cls)
*/
void Window::InvalidateData(int data, bool gui_scope)
{
this->SetDirty();
if (!gui_scope) {
/* Schedule GUI-scope invalidation for next redraw. */
this->scheduled_invalidation_data.push_back(data);
} else {
this->SetDirty();
}
this->OnInvalidateData(data, gui_scope);
}
@@ -3352,6 +3353,7 @@ void Window::ProcessScheduledInvalidations()
if (this->window_class == WC_INVALID) break;
this->OnInvalidateData(data, true);
}
if (!this->scheduled_invalidation_data.empty()) this->SetDirty();
this->scheduled_invalidation_data.clear();
}