From: Carl Hetherington Date: Sat, 19 Nov 2016 20:37:33 +0000 (+0000) Subject: Focus the timecode control on opening playhead-to-timecode. X-Git-Tag: v2.10.3-test~32 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=fab7fa5a9ef1d069c7ca32e3669d0e37e896250c Focus the timecode control on opening playhead-to-timecode. --- 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 (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 @@ -84,6 +84,12 @@ TimecodeBase::TimecodeBase (wxWindow* parent, bool set_button) SetSizerAndFit (_sizer); } +void +TimecodeBase::set_focus () +{ + _hours->SetFocus (); +} + void TimecodeBase::clear () { 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 Changed;