summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1920cc2940..d6c407d548 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -38,6 +38,7 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterreg.h"
#include "llmenubutton.h"
#include "lloutfitobserver.h"
@@ -51,7 +52,6 @@
#include "llviewermenu.h"
#include "llviewertexturelist.h"
#include "llsidepanelinventory.h"
-#include "llsidetray.h"
const std::string FILTERS_FILENAME("filters.xml");
@@ -572,28 +572,21 @@ void LLPanelMainInventory::updateItemcountText()
{
text = getString("ItemcountUnknown");
}
+
+ // *TODO: Cache the LLUICtrl* for the ItemcountText control
getChild<LLUICtrl>("ItemcountText")->setValue(text);
}
void LLPanelMainInventory::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
-
- if (inbox_panel)
- {
- inbox_panel->clearSelection();
- }
-
- LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
-
- if (outbox_panel)
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (!sidepanel_inventory)
{
- outbox_panel->clearSelection();
+ llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl;
+ return;
}
- sidepanel_inventory->updateVerbs();
+ sidepanel_inventory->clearSelections(false, true, true);
}
void LLPanelMainInventory::setFilterTextFromFilter()
@@ -1176,7 +1169,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "share")
{
- LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
return parent ? parent->canShare() : FALSE;
}