summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-21 19:50:39 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-21 19:50:39 +0000
commit321a58aba62adeb1f2650ad0c7d9557e33c7d594 (patch)
treed20622cbaab0e9b6d503b1b1382f260ccd6b50b1 /src
parent6f2a0e80468f71aba9649bc36ae2ef4afc245203 (diff)
Fix broken content remove button.
Diffstat (limited to 'src')
-rw-r--r--src/tools/dcpomatic.cc2
-rw-r--r--src/wx/content_panel.cc8
-rw-r--r--src/wx/content_panel.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 7d41ff2e6..1e40fbd69 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -251,7 +251,7 @@ public:
accel[0].Set (wxACCEL_CTRL, static_cast<int>('A'), ID_add_file);
accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove);
Bind (wxEVT_MENU, boost::bind (&ContentPanel::add_file_clicked, _film_editor->content_panel()), ID_add_file);
- Bind (wxEVT_MENU, boost::bind (&ContentPanel::remove_clicked, _film_editor->content_panel()), ID_remove);
+ Bind (wxEVT_MENU, boost::bind (&ContentPanel::remove_clicked, _film_editor->content_panel(), true), ID_remove);
wxAcceleratorTable accel_table (2, accel);
SetAcceleratorTable (accel_table);
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index a68998232..59a43fa37 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -123,7 +123,7 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
_content->Bind (wxEVT_DROP_FILES, boost::bind (&ContentPanel::files_dropped, this, _1));
_add_file->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::add_file_clicked, this));
_add_folder->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::add_folder_clicked, this));
- _remove->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::remove_clicked, this));
+ _remove->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::remove_clicked, this, false));
_earlier->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::earlier_clicked, this));
_later->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::later_clicked, this));
_timeline->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentPanel::timeline_clicked, this));
@@ -326,12 +326,12 @@ ContentPanel::add_folder_clicked ()
}
void
-ContentPanel::remove_clicked ()
+ContentPanel::remove_clicked (bool hotkey)
{
- /* This method is also called when Delete is pressed, so check that our notebook page
+ /* If the method was called because Delete was pressed check that our notebook page
is visible and that the content list is focussed.
*/
- if (_parent->GetCurrentPage() != _panel || !_content->HasFocus()) {
+ if (hotkey && (_parent->GetCurrentPage() != _panel || !_content->HasFocus())) {
return;
}
diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h
index 1115aaf31..5f6faa0a3 100644
--- a/src/wx/content_panel.h
+++ b/src/wx/content_panel.h
@@ -65,7 +65,7 @@ public:
FFmpegContentList selected_ffmpeg ();
void add_file_clicked ();
- void remove_clicked ();
+ void remove_clicked (bool hotkey);
private:
void selection_changed ();