From 8b4f34857f1c3d6715e45944f1c4a7d90c696566 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 21 Jun 2017 10:31:22 +0200 Subject: [PATCH] - moviebrowser: fix deletion of cursor_only movie via "menu" -> "yellow" Signed-off-by: Thilo Graf --- src/gui/moviebrowser/mb.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 7a881f479..38625fe4e 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2479,13 +2479,20 @@ bool CMovieBrowser::onDelete(bool cursor_only) MI_MOVIE_INFO *movieinfo; movieinfo = NULL; - filelist_it = filelist.end(); - if (!cursor_only && getSelectedFiles(filelist, movielist)) - filelist_it = filelist.begin(); - if (filelist.empty()) { //just add the m_movieSelectionHandler + + if (cursor_only) + { + filelist.clear(); + movielist.clear(); + + // just add the m_movieSelectionHandler filelist.push_back(m_movieSelectionHandler->file); movielist.push_back(m_movieSelectionHandler); } + else + { + getSelectedFiles(filelist, movielist); + } MI_MOVIE_LIST dellist; MI_MOVIE_LIST::iterator dellist_it;