diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-10-19 17:07:22 +0300 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-10-19 17:07:22 +0300 |
| commit | 9a34791488b0d2fc68fc7bc09f0685fe42557ea4 (patch) | |
| tree | 1a5711a2166375843ad1f2e59d792b1f079f9976 /indra/newview/llpanelmaininventory.cpp | |
| parent | 72b0cb146753c0e3801145936c3cf3fd6e8508c5 (diff) | |
MAINT-7906 FIXED Inventory jumps when detaching worn items in appearance panel
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
| -rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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(); } |
