1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #683 from vlad-yakovlev/fix-map-select-crahs

[3167] Crash when click single scenario in new game
This commit is contained in:
Alexander Shishkin
2021-02-16 07:59:47 +03:00
committed by GitHub

View File

@@ -656,19 +656,20 @@ CFocusable::~CFocusable()
focusables -= this; focusables -= this;
} }
void CFocusable::giveFocus() void CFocusable::giveFocus()
{ {
focus = true;
focusGot();
redraw();
if(inputWithFocus) if(inputWithFocus)
{ {
inputWithFocus->focus = false; inputWithFocus->focus = false;
inputWithFocus->focusLost();
inputWithFocus->redraw(); inputWithFocus->redraw();
} }
focus = true;
inputWithFocus = this; inputWithFocus = this;
focusGot();
redraw();
} }
void CFocusable::moveFocus() void CFocusable::moveFocus()