Codechange: introduce and use function to raise and dirty a set of widgets when they are lowered

This commit is contained in:
Rubidium
2023-09-17 06:40:28 +02:00
committed by rubidium42
parent 6580ff1adb
commit 7ef22af2bb
6 changed files with 31 additions and 36 deletions

View File

@@ -649,10 +649,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
{
for (uint i = WID_ETT_START; i < this->nested_array_size; i++) {
if (i == WID_ETT_BUTTONS_START) i = WID_ETT_BUTTONS_END; // skip the buttons
if (this->IsWidgetLowered(i)) {
this->RaiseWidget(i);
this->SetWidgetDirty(i);
}
this->RaiseWidgetWhenLowered(i);
}
}