mirror of https://github.com/OpenTTD/OpenTTD
Fix #6438: Properly invalidate AI Settings window when max no competitor setting is changed.
parent
9e9d485713
commit
0355f887d9
|
@ -875,7 +875,6 @@ struct AIConfigWindow : public Window {
|
||||||
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
|
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
|
||||||
}
|
}
|
||||||
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
|
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
|
||||||
this->InvalidateData();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1174,6 +1174,7 @@ static bool MaxNoAIsChange(int32 i)
|
||||||
ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, WL_CRITICAL);
|
ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, WL_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InvalidateWindowClassesData(WC_GAME_OPTIONS, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue