diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-01 21:12:34 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-01 21:12:34 -0500 |
commit | 8fdd2e0b28121ead88da55c2be760a5f62b6d112 (patch) | |
tree | 326812c75067e8555096d79b207bde8ec397907d /indra/newview/llassetuploadresponders.cpp | |
parent | f62ea011ea5e99de16bd3bb761ea9203815ce0e6 (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/llassetuploadresponders.cpp')
-rw-r--r-- | indra/newview/llassetuploadresponders.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index d5f9f7ca5d..1d03cc8823 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -42,7 +42,6 @@ #include "llnotify.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" -#include "llfloaterinventory.h" #include "llpermissionsflags.h" #include "llpreviewnotecard.h" #include "llpreviewscript.h" @@ -287,19 +286,18 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. - LLFloaterInventory* view = LLFloaterInventory::getActiveInventory(); - if(view) + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if (active_panel) { - LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); - - view->getPanel()->setSelection(content["new_inventory_item"].asUUID(), TAKE_FOCUS_NO); + active_panel->setSelection(content["new_inventory_item"].asUUID(), TAKE_FOCUS_NO); if((LLAssetType::AT_TEXTURE == asset_type || LLAssetType::AT_SOUND == asset_type) && LLFilePicker::instance().getFileCount() <= FILE_COUNT_DISPLAY_THRESHOLD) { - view->getPanel()->openSelected(); + active_panel->openSelected(); } //LLFloaterInventory::dumpSelectionInformation((void*)view); // restore keyboard focus + LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); gFocusMgr.setKeyboardFocus(focus); } } |