summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-11-19 20:37:33 +0000
committerCarl Hetherington <cth@carlh.net>2016-11-19 20:37:33 +0000
commitfab7fa5a9ef1d069c7ca32e3669d0e37e896250c (patch)
tree8b79934eacbaf1c39060a9d4ba9307c8178608ef /src
parent24e890682b3f2aa211277ad8b6b3591f2026d4be (diff)
Focus the timecode control on opening playhead-to-timecode.
Diffstat (limited to 'src')
-rw-r--r--src/wx/playhead_to_timecode_dialog.cc1
-rw-r--r--src/wx/timecode.cc6
-rw-r--r--src/wx/timecode.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/wx/playhead_to_timecode_dialog.cc b/src/wx/playhead_to_timecode_dialog.cc
index be4ac7dfc..a691aa64e 100644
--- a/src/wx/playhead_to_timecode_dialog.cc
+++ b/src/wx/playhead_to_timecode_dialog.cc
@@ -26,6 +26,7 @@ PlayheadToTimecodeDialog::PlayheadToTimecodeDialog (wxWindow* parent, int fps)
{
add (_("Go to"), true);
_timecode = add (new Timecode<DCPTime> (this, false));
+ _timecode->set_focus ();
layout ();
}
diff --git a/src/wx/timecode.cc b/src/wx/timecode.cc
index 8db605094..454614a1b 100644
--- a/src/wx/timecode.cc
+++ b/src/wx/timecode.cc
@@ -85,6 +85,12 @@ TimecodeBase::TimecodeBase (wxWindow* parent, bool set_button)
}
void
+TimecodeBase::set_focus ()
+{
+ _hours->SetFocus ();
+}
+
+void
TimecodeBase::clear ()
{
checked_set (_hours, wxT (""));
diff --git a/src/wx/timecode.h b/src/wx/timecode.h
index d9fe4ee4c..31ddd111c 100644
--- a/src/wx/timecode.h
+++ b/src/wx/timecode.h
@@ -35,6 +35,7 @@ public:
void clear ();
void set_editable (bool);
+ void set_focus ();
boost::signals2::signal<void ()> Changed;