From aad67b5736ce1f265eaf8aa0596c80c089f659ec Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 1 Feb 2009 22:32:07 +0000 Subject: (svn r15312) -Codechange: Handle closing of drop down menus when clicking in a window in a single place, instead of in the OnClick event for some windows. This standardises behaviour so that clicking anywhere in a window will close its drop down menu, which happened before for some windows but not all. In addition the dubious feature of hiding a drop down menu by opening the same menu has been removed. This only caused wasted CPU cycles as a whole new list was generated and then destroyed. Breathe. --- src/group_gui.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/group_gui.cpp') diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 3ec866801..b8cc53377 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -440,8 +440,6 @@ public: virtual void OnClick(Point pt, int widget) { - if (widget != GRP_WIDGET_SORT_BY_DROPDOWN && widget != GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN) HideDropDownMenu(this); - switch(widget) { case GRP_WIDGET_SORT_BY_ORDER: // Flip sorting method ascending/descending this->vehicles.ToggleSortOrder(); -- cgit v1.2.3-54-g00ecf