From a73013f7081db15aae93cc82feb895139b1847db Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 20 Jan 2012 13:41:43 -0800 Subject: EXP-1799 FIX -- Replace and Add to Outfit options appear as grayed out in Inventory * Modified build context menu code to not disable items that are invisible so secondary background fetch can coalesce menu options with proper state. * Removed "Move to Merchant Outbox" context menu option. --- indra/newview/llinventorybridge.cpp | 17 +++++------------ indra/newview/skins/default/xui/en/menu_inventory.xml | 8 -------- 2 files changed, 5 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 12322b2921..97e61f4c99 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -519,7 +519,6 @@ void hide_context_entries(LLMenuGL& menu, { menu_item->setVisible(FALSE); } - menu_item->setEnabled(FALSE); } else { @@ -528,14 +527,10 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - BOOL enabled = menu_item->getEnabled(); - for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2) + bool enabled = (menu_item->getEnabled() == TRUE); + for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) { - if (*itor2 == name) - { - enabled = FALSE; - break; - } + enabled &= (*itor2 != name); } menu_item->setEnabled(enabled); @@ -613,12 +608,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, copyable = inv_item->getPermissions().allowCopyBy(gAgent.getID()); } - const std::string merchant_action = ((copyable == true) ? "Merchant Copy" : "Merchant Move"); - items.push_back(merchant_action); - + items.push_back(std::string("Merchant Copy")); if (!canListOnMarketplaceNow()) { - disabled_items.push_back(merchant_action); + disabled_items.push_back(std::string("Merchant Copy")); } } } diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 31dcdfffbb..ef4a1bc061 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -685,14 +685,6 @@ function="Inventory.DoToSelected" parameter="copy_to_outbox" /> - - -