summaryrefslogtreecommitdiff
path: root/indra/newview/llinspect.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-26 12:02:34 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-26 12:02:34 -0800
commit13d4257868451d1e3a5797bd02a0e6f749cc0836 (patch)
treebafaaa1220764a6f989f84cb434e82ef341a27c7 /indra/newview/llinspect.cpp
parent2d7697dfade4ecbb8fbe9b26a5332fc9e93f5669 (diff)
parentfc70ca5403acdd99b2235dbf4e513a4dd806c850 (diff)
automated merge
Diffstat (limited to 'indra/newview/llinspect.cpp')
-rw-r--r--indra/newview/llinspect.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp
index c7b8db9635..c7b651f37c 100644
--- a/indra/newview/llinspect.cpp
+++ b/indra/newview/llinspect.cpp
@@ -34,6 +34,7 @@
#include "llcontrol.h" // LLCachedControl
#include "llui.h" // LLUI::sSettingsGroups
+#include "llviewermenu.h"
LLInspect::LLInspect(const LLSD& key)
: LLFloater(key),
@@ -108,3 +109,26 @@ void LLInspect::onMouseLeave(S32 x, S32 y, MASK mask)
{
mOpenTimer.unpause();
}
+
+bool LLInspect::childHasVisiblePopupMenu()
+{
+ // Child text-box may spawn a pop-up menu, if mouse is over the menu, Inspector
+ // will hide(which is not expected).
+ // This is an attempt to find out if child control has spawned a menu.
+
+ LLView* child_menu = gMenuHolder->getVisibleMenu();
+ if(child_menu)
+ {
+ LLRect floater_rc = calcScreenRect();
+ LLRect menu_screen_rc = child_menu->calcScreenRect();
+ S32 mx, my;
+ LLUI::getMousePositionScreen(&mx, &my);
+
+ // This works wrong if we spawn a menu near Inspector and menu overlaps Inspector.
+ if(floater_rc.overlaps(menu_screen_rc) && menu_screen_rc.pointInRect(mx, my))
+ {
+ return true;
+ }
+ }
+ return false;
+}