summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorybridge.cpp6
-rw-r--r--indra/newview/llpanelmaininventory.cpp20
-rw-r--r--indra/newview/llpanelmaininventory.h6
3 files changed, 25 insertions, 7 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3f18039376..904bc29929 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1876,17 +1876,11 @@ void LLItemBridge::buildDisplayName() const
{
mDisplayName.assign(LLStringUtil::null);
}
- S32 old_length = mSearchableName.length();
- S32 new_length = mDisplayName.length() + getLabelSuffix().length();
mSearchableName.assign(mDisplayName);
mSearchableName.append(getLabelSuffix());
LLStringUtil::toUpper(mSearchableName);
- if ((old_length > new_length) && getInventoryFilter())
- {
- getInventoryFilter()->setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
- }
//Name set, so trigger a sort
if(mParent)
{
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index f771a027e0..7d4a05565c 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -29,6 +29,7 @@
#include "llagent.h"
#include "llagentcamera.h"
+#include "llagentwearables.h"
#include "llavataractions.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -179,6 +180,8 @@ BOOL LLPanelMainInventory::postBuild()
mWornItemsPanel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
mWornItemsPanel->getFilter().markDefault();
mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2));
+
+ gAgentWearables.addLoadedCallback(boost::bind(&LLPanelMainInventory::updateWornItemsPanel, this));
}
mSearchTypeCombo = getChild<LLComboBox>("search_type");
if(mSearchTypeCombo)
@@ -336,6 +339,18 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
}
+void LLPanelMainInventory::updateWornItemsPanel()
+{
+ if (!mUpdateWornTimer.getStarted())
+ {
+ mUpdateWornTimer.start();
+ }
+ else
+ {
+ mUpdateWornTimer.reset();
+ }
+}
+
//----------------------------------------------------------------------------
// menu callbacks
@@ -670,6 +685,11 @@ void LLPanelMainInventory::draw()
mActivePanel->setSortOrder(order);
mResortActivePanel = false;
}
+ if (mWornItemsPanel && mUpdateWornTimer.getStarted() && (mUpdateWornTimer.getElapsedTimeF32() > 1))
+ {
+ mUpdateWornTimer.stop();
+ mWornItemsPanel->getFilter().setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
+ }
LLPanel::draw();
updateItemcountText();
}
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 530f4e618c..a309b3619c 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -111,7 +111,9 @@ protected:
const std::string getFilterSubString();
void setFilterSubString(const std::string& string);
-
+
+ void updateWornItemsPanel();
+
// menu callbacks
void doToSelected(const LLSD& userdata);
void closeAllFolders();
@@ -142,6 +144,8 @@ private:
S32 mItemCount;
std::string mItemCountString;
LLComboBox* mSearchTypeCombo;
+ LLFrameTimer mUpdateWornTimer;
+
//////////////////////////////////////////////////////////////////////////////////