diff --git a/src/apps/mediaplayer/playlist/ListViews.cpp b/src/apps/mediaplayer/playlist/ListViews.cpp index 514022d1dc..b8b6095d48 100644 --- a/src/apps/mediaplayer/playlist/ListViews.cpp +++ b/src/apps/mediaplayer/playlist/ListViews.cpp @@ -722,11 +722,19 @@ DragSortableListView::RemoveSelected() { BList indices; GetSelectedItems(indices); + int32 index = CurrentSelection()-1; DeselectAll(); if (indices.CountItems() > 0) RemoveItemList(indices); + + if (CountItems() > 0) { + if (index < 0) + index = 0; + + Select(index); + } } // RemoveAll diff --git a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp index 379dc88613..e887ec031c 100644 --- a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp +++ b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp @@ -240,9 +240,11 @@ PlaylistWindow::MessageReceived(BMessage* message) case M_PLAYLIST_RANDOMIZE: fListView->Randomize(); break; + case M_PLAYLIST_REMOVE: fListView->RemoveSelected(); break; + case M_PLAYLIST_MOVE_TO_TRASH: { int32 index; @@ -252,6 +254,7 @@ PlaylistWindow::MessageReceived(BMessage* message) fListView->RemoveSelectionToTrash(); break; } + default: BWindow::MessageReceived(message); break;