From 8ed5f9b1621c71f21a89b63ede2f23949e3ed6a4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 11 Jun 2009 04:51:48 -0700 Subject: Fixed 'Unlink' not toggling in Tools menu --- linden/indra/newview/llviewermenu.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b255883..7c556df 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -4188,9 +4188,17 @@ class LLToolsEnableUnlink : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && + bool new_value = false; + if (LLSelectMgr::getInstance()->selectGetAllRootsValid() && LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && - !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment(); + !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) + { + if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != + LLSelectMgr::getInstance()->getSelection()->getObjectCount()) + { + new_value = true; + } + } gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true; } -- cgit v1.1