Codechange: Set specific widgets dirty instead of window.

This commit is contained in:
Peter Nelson
2021-05-06 01:36:56 +01:00
committed by PeterN
parent e2774354b4
commit 8321ef0061
4 changed files with 8 additions and 7 deletions

View File

@@ -789,7 +789,7 @@ struct MusicWindow : public Window {
byte &vol = (widget == WID_M_MUSIC_VOL) ? _settings_client.music.music_vol : _settings_client.music.effect_vol;
if (ClickVolumeSliderWidget(this->GetWidget<NWidgetBase>(widget)->GetCurrentRect(), pt, vol)) {
if (widget == WID_M_MUSIC_VOL) MusicDriver::GetInstance()->SetVolume(vol);
this->SetDirty();
this->SetWidgetDirty(widget);
SetWindowClassesDirty(WC_GAME_OPTIONS);
}