Codechange: Use window parent association for dropdowns.

This replaces the separate window class and number properties, and
allows the window system to close dropdowns automatically.
This commit is contained in:
Peter Nelson
2023-06-04 02:13:42 +02:00
committed by Loïc Guilloux
parent 2d8d9c49c4
commit 81e5cd23e0
8 changed files with 22 additions and 39 deletions
-3
View File
@@ -849,7 +849,6 @@ public:
if (this->selected_order == -1) break;
this->CloseChildWindows();
HideDropDownMenu(this);
this->selected_order = -1;
break;
@@ -881,7 +880,6 @@ public:
if (to == INVALID_VEH_ORDER_ID) {
/* Deleting selected order */
this->CloseChildWindows();
HideDropDownMenu(this);
this->selected_order = -1;
break;
}
@@ -1181,7 +1179,6 @@ public:
/* This order won't be selected any more, close all child windows and dropdowns */
this->CloseChildWindows();
HideDropDownMenu(this);
if (sel == INVALID_VEH_ORDER_ID || this->vehicle->owner != _local_company) {
/* Deselect clicked order */