summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-11-20 23:13:38 +0100
committerCarl Hetherington <cth@carlh.net>2024-11-20 23:13:38 +0100
commit89a7c0c5ea6205c4f19be9c7e3186b4d7ad1e44c (patch)
tree6de5445ffc69135f695e9a0fb549b091b59ef831
parentec7a23305dfb378c589180ec1c9f689224acfce4 (diff)
parentd51d330f78f11160509a764060ecc17a731e97cf (diff)
Merge branch 'main' into v2.17.x
-rw-r--r--src/wx/content_panel.cc8
-rw-r--r--src/wx/content_panel.h1
-rw-r--r--src/wx/content_widget.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index bde1ca339..7d329aaed 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -310,6 +310,7 @@ ContentPanel::ContentPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& vie
_content->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&ContentPanel::item_selected, this));
_content->Bind (wxEVT_LIST_ITEM_DESELECTED, boost::bind (&ContentPanel::item_deselected, this));
+ _content->Bind (wxEVT_LIST_ITEM_FOCUSED, boost::bind (&ContentPanel::item_focused, this));
_content->Bind (wxEVT_LIST_ITEM_RIGHT_CLICK, boost::bind (&ContentPanel::right_click, this, _1));
_content->Bind (wxEVT_DROP_FILES, boost::bind (&ContentPanel::files_dropped, this, _1));
_add_file->Bind (wxEVT_BUTTON, boost::bind (&ContentPanel::add_file_clicked, this));
@@ -460,6 +461,13 @@ ContentPanel::item_selected ()
void
+ContentPanel::item_focused()
+{
+ signal_manager->when_idle(boost::bind(&ContentPanel::check_selection, this));
+}
+
+
+void
ContentPanel::check_selection ()
{
if (_no_check_selection) {
diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h
index 38b634a62..f99d518a2 100644
--- a/src/wx/content_panel.h
+++ b/src/wx/content_panel.h
@@ -102,6 +102,7 @@ private:
void item_selected ();
void item_deselected ();
void item_deselected_idle ();
+ void item_focused ();
void check_selection ();
void add_folder_clicked ();
void add_dcp_clicked ();
diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h
index 302436e55..f7edf6b30 100644
--- a/src/wx/content_widget.h
+++ b/src/wx/content_widget.h
@@ -197,7 +197,7 @@ private:
_wrapped->Hide ();
_sizer->Detach (_wrapped);
_button->Show ();
- _sizer->Add (_button, _position, _span);
+ _sizer->Add(_button, _position, _span, wxALIGN_CENTER_VERTICAL);
_sizer->Layout ();
}