(svn r24669) -Fix: Auto-expand advanced settings only when selecting a 'deviation' filter.
This commit is contained in:
@@ -2331,8 +2331,15 @@ struct GameSettingsWindow : QueryStringBaseWindow {
|
|||||||
{
|
{
|
||||||
if (widget == WID_GS_RESTRICT_DROPDOWN) {
|
if (widget == WID_GS_RESTRICT_DROPDOWN) {
|
||||||
this->cur_restriction_mode = (RestrictionMode)index;
|
this->cur_restriction_mode = (RestrictionMode)index;
|
||||||
|
if (!this->manually_changed_folding &&
|
||||||
|
(this->cur_restriction_mode == RM_CHANGED_AGAINST_DEFAULT ||
|
||||||
|
this->cur_restriction_mode == RM_CHANGED_AGAINST_DEFAULT_WO_LOCAL ||
|
||||||
|
this->cur_restriction_mode == RM_CHANGED_AGAINST_NEW)) {
|
||||||
|
/* Expand all when selecting 'changes'. Update the filter state first, in case it becomes less restrictive in some cases. */
|
||||||
_settings_main_page.UpdateFilterState(string_filter, false, this->cur_restriction_mode);
|
_settings_main_page.UpdateFilterState(string_filter, false, this->cur_restriction_mode);
|
||||||
this->SetDirty();
|
_settings_main_page.UnFoldAll();
|
||||||
|
}
|
||||||
|
this->InvalidateData();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2358,10 +2365,6 @@ struct GameSettingsWindow : QueryStringBaseWindow {
|
|||||||
* "normal" dropdown box. The special dropdown boxes added for every
|
* "normal" dropdown box. The special dropdown boxes added for every
|
||||||
* setting that needs one can't have this call. */
|
* setting that needs one can't have this call. */
|
||||||
Window::OnDropdownClose(pt, widget, index, instant_close);
|
Window::OnDropdownClose(pt, widget, index, instant_close);
|
||||||
|
|
||||||
if (!this->manually_changed_folding) _settings_main_page.UnFoldAll();
|
|
||||||
|
|
||||||
this->InvalidateData();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user