Focus the timecode control on opening playhead-to-timecode.
authorCarl Hetherington <cth@carlh.net>
Sat, 19 Nov 2016 20:37:33 +0000 (20:37 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 19 Nov 2016 20:37:33 +0000 (20:37 +0000)
src/wx/playhead_to_timecode_dialog.cc
src/wx/timecode.cc
src/wx/timecode.h

index be4ac7dfccc524986f4dd2a5823606c802021305..a691aa64e0f7cfc260e9ddd754da11ea04e99176 100644 (file)
@@ -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 ();
 }
index 8db6050943caff69504ff09324650251a2fa4282..454614a1b16bf7473a03ded8aebd5b9608ac340f 100644 (file)
@@ -84,6 +84,12 @@ TimecodeBase::TimecodeBase (wxWindow* parent, bool set_button)
        SetSizerAndFit (_sizer);
 }
 
+void
+TimecodeBase::set_focus ()
+{
+       _hours->SetFocus ();
+}
+
 void
 TimecodeBase::clear ()
 {
index d9fe4ee4c96af761b0adc5238a82d4a2cd9fa8a9..31ddd111caec3aa17538122100dad3b42713389a 100644 (file)
@@ -35,6 +35,7 @@ public:
        void clear ();
 
        void set_editable (bool);
+       void set_focus ();
 
        boost::signals2::signal<void ()> Changed;