From 8fdd2e0b28121ead88da55c2be760a5f62b6d112 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 1 Dec 2009 21:12:34 -0500 Subject: 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 --- indra/newview/llviewermenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4307002980..0cedf3acd3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -31,14 +31,16 @@ */ #include "llviewerprecompiledheaders.h" - #include "llviewermenu.h" +// TODO: Remove unnecessary headers. + // system library includes #include #include #include + // linden library includes #include "llaudioengine.h" #include "llfloaterreg.h" @@ -141,7 +143,6 @@ #include "llimagetga.h" #include "llinventorybridge.h" #include "llinventorymodel.h" -#include "llfloaterinventory.h" #include "llkeyboard.h" #include "llpanellogin.h" #include "llpanelblockedlist.h" @@ -6962,16 +6963,15 @@ void handle_grab_texture(void* data) gInventory.updateItem(item); gInventory.notifyObservers(); - LLFloaterInventory* view = LLFloaterInventory::getActiveInventory(); - // Show the preview panel for textures to let // user know that the image is now in inventory. - if(view) + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if(active_panel) { LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); - view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO); - view->getPanel()->openSelected(); + active_panel->setSelection(item_id, TAKE_FOCUS_NO); + active_panel->openSelected(); //LLFloaterInventory::dumpSelectionInformation((void*)view); // restore keyboard focus gFocusMgr.setKeyboardFocus(focus_ctrl); -- cgit v1.2.3