summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rwxr-xr-xindra/newview/lltoolpie.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 959301b546..8191958dd4 100755
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1311,7 +1311,16 @@ void LLToolPie::handleDeselect()
}
// remove temporary selection for pie menu
LLSelectMgr::getInstance()->setHoverObject(NULL);
- LLSelectMgr::getInstance()->validateSelection();
+
+ // Menu may be still up during transfer to different tool.
+ // toolfocus and toolgrab should retain menu, they will clear it if needed
+ MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
+ if (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0)
+ {
+ // in most cases menu is useless without correct selection, so either keep both or discard both
+ gMenuHolder->hideMenus();
+ LLSelectMgr::getInstance()->validateSelection();
+ }
}
LLTool* LLToolPie::getOverrideTool(MASK mask)