# HG changeset patch # User peter1138 # Date 1200577048 0 # Node ID 9154cb24bc3269ca3f8b654e267944b3106b6de0 # Parent deeb58f7bf53fe09297ab8287e524e70755b1421 (svn r11892) -Fix (r11879): View switched from ungrouped to all vehicles as ungrouped is not technically a valid group, and ensure dropdown is removed on any click in the window. diff -r deeb58f7bf53 -r 9154cb24bc32 src/group_gui.cpp --- a/src/group_gui.cpp Thu Jan 17 02:13:01 2008 +0000 +++ b/src/group_gui.cpp Thu Jan 17 13:37:28 2008 +0000 @@ -305,7 +305,7 @@ case WE_INVALIDATE_DATA: gv->l.flags |= VL_REBUILD; gl->l.flags |= VL_REBUILD; - if (!IsValidGroupID(gv->group_sel)) { + if (!(IsAllGroupID(gv->group_sel) || IsDefaultGroupID(gv->group_sel) || IsValidGroupID(gv->group_sel))) { gv->group_sel = ALL_GROUP; HideDropDownMenu(w); } @@ -503,6 +503,8 @@ } case WE_CLICK: + HideDropDownMenu(w); + switch(e->we.click.widget) { case GRP_WIDGET_SORT_BY_ORDER: // Flip sorting method ascending/descending gv->l.flags ^= VL_DESC;