diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-29 22:14:15 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-29 22:14:25 +0200 |
| commit | 40d38c8d011f0863f396f21cd750cdcef803a792 (patch) | |
| tree | fcbb5d5488f02198b49984631ee4c7b0f3ebe04b /src/wx/playhead_to_frame_dialog.cc | |
| parent | 48c75fff036cb6960fc4c86317231914588a668d (diff) | |
Put current frame position in seek-by-frame dialogue when opening it (#1736).
Diffstat (limited to 'src/wx/playhead_to_frame_dialog.cc')
| -rw-r--r-- | src/wx/playhead_to_frame_dialog.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/playhead_to_frame_dialog.cc b/src/wx/playhead_to_frame_dialog.cc index 4c8bc1cc6..b4c4b1030 100644 --- a/src/wx/playhead_to_frame_dialog.cc +++ b/src/wx/playhead_to_frame_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2016-2020 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -21,16 +21,19 @@ #include "playhead_to_frame_dialog.h" #include <dcp/locale_convert.h> +using std::string; using dcp::locale_convert; using namespace dcpomatic; -PlayheadToFrameDialog::PlayheadToFrameDialog (wxWindow* parent, int fps) +PlayheadToFrameDialog::PlayheadToFrameDialog (wxWindow* parent, DCPTime time, int fps) : TableDialog (parent, _("Go to frame"), 2, 1, true) , _fps (fps) { add (_("Go to"), true); _frame = add (new wxTextCtrl (this, wxID_ANY, wxT (""))); _frame->SetFocus (); + _frame->SetValue (std_to_wx(locale_convert<string>(time.frames_round(fps) + 1))); + _frame->SetSelection (-1, -1); layout (); } |
