From: <dil...@us...> - 2014-03-02 17:24:26
|
Revision: 6940 http://sourceforge.net/p/freeorion/code/6940 Author: dilvish-fo Date: 2014-03-02 17:24:22 +0000 (Sun, 02 Mar 2014) Log Message: ----------- re-ordered the items in the ProductionQueue popup menu so that delete is last Modified Paths: -------------- trunk/FreeOrion/UI/ProductionWnd.cpp Modified: trunk/FreeOrion/UI/ProductionWnd.cpp =================================================================== --- trunk/FreeOrion/UI/ProductionWnd.cpp 2014-03-02 17:19:24 UTC (rev 6939) +++ trunk/FreeOrion/UI/ProductionWnd.cpp 2014-03-02 17:24:22 UTC (rev 6940) @@ -623,32 +623,32 @@ * being interpreted correctly (can instead be treated as simply two unrelated left clicks) */ void ProdQueueListBox::ItemRightClicked(GG::ListBox::iterator it, const GG::Pt& pt) { GG::MenuItem menu_contents; - menu_contents.next_level.push_back(GG::MenuItem(UserString("DELETE_QUEUE_ITEM"), 1, false, false)); - menu_contents.next_level.push_back(GG::MenuItem(UserString("MOVE_UP_QUEUE_ITEM"), 2, false, false)); - menu_contents.next_level.push_back(GG::MenuItem(UserString("MOVE_DOWN_QUEUE_ITEM"), 3, false, false)); + menu_contents.next_level.push_back(GG::MenuItem(UserString("MOVE_UP_QUEUE_ITEM"), 1, false, false)); + menu_contents.next_level.push_back(GG::MenuItem(UserString("MOVE_DOWN_QUEUE_ITEM"), 2, false, false)); + menu_contents.next_level.push_back(GG::MenuItem(UserString("DELETE_QUEUE_ITEM"), 3, false, false)); GG::PopupMenu popup(pt.x, pt.y, ClientUI::GetFont(), menu_contents, GG::CLR_RED, ClientUI::WndOuterBorderColor(), ClientUI::WndColor(), ClientUI::EditHiliteColor()); if (popup.Run()) { switch (popup.MenuID()) { - case 1: { // delete item + case 1: { // move item to top // emit a signal so that the ProductionWnd can take necessary steps - DoubleClickedSignal(it); - break; - } - case 2: { // move item to top - // emit a signal so that the ProductionWnd can take necessary steps if (QueueRow* queue_row = boost::polymorphic_downcast<QueueRow*>(*it)) { QueueItemMoved(queue_row, 0); } break; } - case 3: { // moe item to bottom + case 2: { // moe item to bottom // emit a signal so that the ProductionWnd can take necessary steps if (QueueRow* queue_row = boost::polymorphic_downcast<QueueRow*>(*it)) { QueueItemMoved(queue_row, NumRows()); } break; } + case 3: { // delete item + // emit a signal so that the ProductionWnd can take necessary steps + DoubleClickedSignal(it); + break; + } default: break; |