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

@@ -2922,10 +2922,7 @@ struct IndustryCargoesWindow : public Window {
{
if (!gui_scope) return;
if (data == NUM_INDUSTRYTYPES) {
if (this->IsWidgetLowered(WID_IC_NOTIFY)) {
this->RaiseWidget(WID_IC_NOTIFY);
this->SetWidgetDirty(WID_IC_NOTIFY);
}
this->RaiseWidgetWhenLowered(WID_IC_NOTIFY);
return;
}