summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-02-01 15:05:43 +0000
committerPeterN <peter@fuzzle.org>2019-02-01 15:20:52 +0000
commit0355f887d99974d21d678f1b7a12a343dc9ab04a (patch)
tree3c98e20b213817de22a4068c5770e15f6adea13d
parent9e9d485713a5441d7170be7c0fea9fb981342acd (diff)
downloadopenttd-0355f887d99974d21d678f1b7a12a343dc9ab04a.tar.xz
Fix #6438: Properly invalidate AI Settings window when max no competitor setting is changed.
-rw-r--r--src/ai/ai_gui.cpp1
-rw-r--r--src/settings.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index aa56b3d83..69476856c 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -875,7 +875,6 @@ struct AIConfigWindow : public Window {
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
}
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
- this->InvalidateData();
break;
}
diff --git a/src/settings.cpp b/src/settings.cpp
index 220628b00..d16cff7a1 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1174,6 +1174,7 @@ static bool MaxNoAIsChange(int32 i)
ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, WL_CRITICAL);
}
+ InvalidateWindowClassesData(WC_GAME_OPTIONS, 0);
return true;
}