# HG changeset patch # User rubidium # Date 1195154332 0 # Node ID 4209769a14d87430d8a740ba0f155a60bec0b779 # Parent e74ce8853ba779c2a341ca4fc97878abaa19d64d (svn r11441) -Fix [FS#1443]: manage list dropdown menu did not "disappear" when the all vehicles are removed from the "current" group. diff -r e74ce8853ba7 -r 4209769a14d8 src/group_gui.cpp --- a/src/group_gui.cpp Thu Nov 15 18:28:00 2007 +0000 +++ b/src/group_gui.cpp Thu Nov 15 19:18:52 2007 +0000 @@ -328,6 +328,19 @@ SetVScrollCount(w, gl->l.list_length); SetVScroll2Count(w, gv->l.list_length); + /* The drop down menu is out, *but* it may not be used, retract it. */ + if (gv->l.list_length == 0 && IsWindowWidgetLowered(w, GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN)) { + RaiseWindowWidget(w, GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN); + Window **w2; + FOR_ALL_WINDOWS(w2) { + if (w->window_class == WP(*w2, dropdown_d).parent_wnd_class && + w->window_number == WP(*w2, dropdown_d).parent_wnd_num) { + DeleteWindow(*w2); + break; + } + } + } + /* Disable all lists management button when the list is empty */ SetWindowWidgetsDisabledState(w, gv->l.list_length == 0 || _local_player != owner, GRP_WIDGET_STOP_ALL,