summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-07-09 14:26:56 -0700
committerRichard Linden <none@none>2010-07-09 14:26:56 -0700
commit1f79bee86ee65a2eb3800db6be1853dd79d7a49d (patch)
treeda6b0df3f35ede4037a3e0bf36cf4c6d07dd4a28 /indra/llui/llflatlistview.cpp
parent419bfb16fdd9b79d32736fd80652685a07f9e39f (diff)
EXT-8237 FIX Opening up Edit Outfit- Add More->Shirt causes FPS to drop from 60fps to 18fps for a really long time
EXT-8235 FIX HUGE long delay when reopening and/or closing edit outfit sidepanel if "Add More..." is active EXT-7695 FIX UI lockup after add wearable, right click av -> Change Outfit reviewed by Vir
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index b87851490d..209bc6925f 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -157,7 +157,7 @@ bool LLFlatListView::insertItemAfter(LLPanel* after_item, LLPanel* item_to_add,
}
-bool LLFlatListView::removeItem(LLPanel* item)
+bool LLFlatListView::removeItem(LLPanel* item, bool rearrange)
{
if (!item) return false;
if (item->getParent() != mItemsPanel) return false;
@@ -165,22 +165,22 @@ bool LLFlatListView::removeItem(LLPanel* item)
item_pair_t* item_pair = getItemPair(item);
if (!item_pair) return false;
- return removeItemPair(item_pair);
+ return removeItemPair(item_pair, rearrange);
}
-bool LLFlatListView::removeItemByValue(const LLSD& value)
+bool LLFlatListView::removeItemByValue(const LLSD& value, bool rearrange)
{
if (value.isUndefined()) return false;
item_pair_t* item_pair = getItemPair(value);
if (!item_pair) return false;
- return removeItemPair(item_pair);
+ return removeItemPair(item_pair, rearrange);
}
-bool LLFlatListView::removeItemByUUID(const LLUUID& uuid)
+bool LLFlatListView::removeItemByUUID(const LLUUID& uuid, bool rearrange)
{
- return removeItemByValue(LLSD(uuid));
+ return removeItemByValue(LLSD(uuid), rearrange);
}
LLPanel* LLFlatListView::getItemByValue(const LLSD& value) const
@@ -970,7 +970,7 @@ bool LLFlatListView::isSelected(item_pair_t* item_pair) const
return std::find(mSelectedItemPairs.begin(), it_end, item_pair) != it_end;
}
-bool LLFlatListView::removeItemPair(item_pair_t* item_pair)
+bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange)
{
llassert(item_pair);
@@ -1002,8 +1002,11 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair)
item_pair->first->die();
delete item_pair;
- rearrangeItems();
- notifyParentItemsRectChanged();
+ if (rearrange)
+ {
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ }
return true;
}