summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-06-10 15:39:13 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-06-10 15:39:13 +0300
commit62c82eef49006f6f94ca2f9ca10b5abc4612a61f (patch)
treeddbf874877087ab4232f787ecb370580a4dd8e4c /indra/newview
parent63c21d120fe1eb940bf959b8465a47a441bcef77 (diff)
EXT-7620 FIXED Disable context-dependant outfit gear menu items if no (or invalid) outfit selected.
The "Create new clothes / body parts" menu items are always enabled because they have no on_enable callback set. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/548/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 0e1e94129b..1286642897 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -169,6 +169,11 @@ private:
bool onEnable(LLSD::String param)
{
const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ if (selected_outfit_id.isNull()) // no selection or invalid outfit selected
+ {
+ return false;
+ }
+
bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
if ("wear" == param)