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

@@ -2128,10 +2128,7 @@ struct MainToolbarWindow : Window {
/* We do not want to automatically raise the pause, fast forward and
* switchbar buttons; they have to stay down when pressed etc. */
for (uint i = WID_TN_SETTINGS; i < WID_TN_SWITCH_BAR; i++) {
if (this->IsWidgetLowered(i)) {
this->RaiseWidget(i);
this->SetWidgetDirty(i);
}
this->RaiseWidgetWhenLowered(i);
}
}