summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbar.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-01 21:12:34 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-01 21:12:34 -0500
commit8fdd2e0b28121ead88da55c2be760a5f62b6d112 (patch)
tree326812c75067e8555096d79b207bde8ec397907d /indra/newview/lltoolbar.cpp
parentf62ea011ea5e99de16bd3bb761ea9203815ce0e6 (diff)
EXT-3028 : "Find Original" does nothing if floater inventory isn't open
Changed logic for getActiveInventory so that it considers InventorySP. Removed getActiveInventory and replaced with getActiveInventoryPanel since that follows its current usage. This currently contains a bug because the InventorySP always thinks it's open. --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lltoolbar.cpp')
-rw-r--r--indra/newview/lltoolbar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 268a18d2a2..bf6d715c31 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -56,6 +56,7 @@
#include "llfloaterchatterbox.h"
#include "llfloaterfriends.h"
#include "llfloatersnapshot.h"
+#include "llinventorypanel.h"
#include "lltoolmgr.h"
#include "llui.h"
#include "llviewermenu.h"
@@ -157,12 +158,11 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
if (!inventory_btn) return FALSE;
- LLFloaterInventory* active_inventory = LLFloaterInventory::getActiveInventory();
-
LLRect button_screen_rect;
inventory_btn->localRectToScreen(inventory_btn->getRect(),&button_screen_rect);
-
- if(active_inventory && active_inventory->getVisible())
+
+ const LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if(active_panel)
{
mInventoryAutoOpen = FALSE;
}
@@ -170,8 +170,8 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
if (mInventoryAutoOpen)
{
- if (!(active_inventory && active_inventory->getVisible()) &&
- mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
+ if (!active_panel &&
+ mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
{
LLFloaterInventory::showAgentInventory();
}