Update the GUI immediately after calling the command from a hotkey

Otherwise the gui takes a bit to update
This commit is contained in:
Rampoina 2022-07-21 08:12:29 +02:00
parent 3313f187bb
commit 9276faeeb5
1 changed files with 5 additions and 1 deletions

View File

@ -454,9 +454,13 @@ void Gui::hotKey(SDL_KeyboardEvent key) {
if(isKeyPressed(configKeys.getSDLKey(name.c_str()),key) == true) {
if(activeCommandType != NULL && activeCommandType->getClass() == ccBuild) {
mouseDownDisplayUnitBuild(i);
computeDisplay();
break;
} else {
if (i < numberCommands) mouseDownDisplayUnitSkills(i);
if (i < numberCommands) {
mouseDownDisplayUnitSkills(i);
computeDisplay();
}
break;
}
}