diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-26 21:55:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-26 21:55:23 +0100 |
| commit | 694d242518613145fd115d26ea19c383c710dc45 (patch) | |
| tree | 396bdc1a3dff9cd32924368b24f078f7c8b96e18 /src/wx | |
| parent | cb161dbe271a9f05826758f40d27e37333a27a31 (diff) | |
Fix non-working delete key.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/content_panel.cc | 6 | ||||
| -rw-r--r-- | src/wx/content_panel.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index efc445bc9..654378248 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -343,14 +343,15 @@ ContentPanel::add_folder_clicked () _film->examine_and_add_content (content); } -void +/** @return true if this remove "click" should be ignored */ +bool ContentPanel::remove_clicked (bool hotkey) { /* If the method was called because Delete was pressed check that our notebook page is visible and that the content list is focussed. */ if (hotkey && (_parent->GetCurrentPage() != _panel || !_content->HasFocus())) { - return; + return true; } BOOST_FOREACH (shared_ptr<Content> i, selected ()) { @@ -358,6 +359,7 @@ ContentPanel::remove_clicked (bool hotkey) } selection_changed (); + return false; } void diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h index e356b5a49..9e6cf9f24 100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -65,7 +65,7 @@ public: FFmpegContentList selected_ffmpeg (); void add_file_clicked (); - void remove_clicked (bool hotkey); + bool remove_clicked (bool hotkey); private: void selection_changed (); |
