summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-07-12 11:14:26 -0700
committerDessie Linden <dessie@lindenlab.com>2010-07-12 11:14:26 -0700
commitb45271834161018be8c825e96c64d9ef7b67401c (patch)
treebfa36a69e2ee97a32a5cf2dd06d610cb5c1656bb /indra/llui/llflatlistview.cpp
parent809a7a3b78f5f14ef22d3a8725e958b1705bd102 (diff)
parentd3f114d6901877bb79ae9719f59d681fa6a9d494 (diff)
Merged from viewer-release
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 6eb214cb93..b313f8c950 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;
+ if (rearrange)
+ {
rearrangeItems();
notifyParentItemsRectChanged();
+ }
return true;
}
@@ -1099,7 +1102,7 @@ void LLFlatListView::onFocusReceived()
{
if (size())
{
- mSelectedItemsBorder->setVisible(TRUE);
+ mSelectedItemsBorder->setVisible(TRUE);
}
gEditMenuHandler = this;
}