From 37e730f7a8b32b243135936780ffa796f18871db Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 20 Jun 2017 22:13:49 +0200 Subject: [PATCH] moviebrowser: fix deletion of cursor_only movie via "menu" -> "yellow" Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3e053e7728c3d75e91dfbd87828fd534eddab09c Author: vanhofen Date: 2017-06-20 (Tue, 20 Jun 2017) Origin message was: ------------------ - moviebrowser: fix deletion of cursor_only movie via "menu" -> "yellow" --- 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 9bcf061cb..85cfcfbc8 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2583,13 +2583,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;