summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 3c0ba7ae28..cf041c4bfb 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -3242,18 +3242,20 @@ void LLFolderView::removeSelectedItems( void )
{
new_selection = item_to_delete->getPreviousOpenNode(FALSE);
}
- if (new_selection)
- {
- setSelectionFromRoot(new_selection, new_selection->isOpen(), gViewerWindow->childHasKeyboardFocus(this));
- }
- else
- {
- setSelectionFromRoot(NULL, gViewerWindow->childHasKeyboardFocus(this));
- }
-
if(parent)
{
- parent->removeItem(item_to_delete);
+ if (parent->removeItem(item_to_delete))
+ {
+ // change selection on successful delete
+ if (new_selection)
+ {
+ setSelectionFromRoot(new_selection, new_selection->isOpen(), gViewerWindow->childHasKeyboardFocus(this));
+ }
+ else
+ {
+ setSelectionFromRoot(NULL, gViewerWindow->childHasKeyboardFocus(this));
+ }
+ }
}
arrangeAll();
}