When a focused drop-down window is closed, focus the parent.

This fixes vehicle route line focusing then using the drop-down
menus in the order GUI.
This commit is contained in:
Jonathan G Rennison
2016-09-21 23:31:06 +01:00
parent f0bcec77fb
commit 662d0e94ab

View File

@@ -173,6 +173,9 @@ struct DropdownWindow : Window {
pt.x -= w2->left;
pt.y -= w2->top;
w2->OnDropdownClose(pt, this->parent_button, this->selected_index, this->instant_close);
if (_focused_window == this) {
SetFocusedWindow(w2);
}
}
delete this->list;
}