Extract common code out into kdm_for_screen()
[dcpomatic.git] / src / wx / controls.cc
index 27139f1f5a8608b2b6c63c71e711863033373a34..e3f476c05e35530dc28a473bb133d4cd160987d4 100644 (file)
@@ -170,7 +170,7 @@ Controls::stopped ()
 void
 Controls::update_position ()
 {
-       if (!_slider_being_moved) {
+       if (!_slider_being_moved && !_viewer->pending_idle_get()) {
                update_position_label ();
                update_position_slider ();
        }
@@ -345,7 +345,7 @@ Controls::setup_sensitivity ()
 void
 Controls::timecode_clicked ()
 {
-       PlayheadToTimecodeDialog* dialog = new PlayheadToTimecodeDialog (this, _film->video_frame_rate ());
+       PlayheadToTimecodeDialog* dialog = new PlayheadToTimecodeDialog (this, _viewer->position(), _film->video_frame_rate());
        if (dialog->ShowModal() == wxID_OK) {
                _viewer->seek (dialog->get(), true);
        }
@@ -355,7 +355,7 @@ Controls::timecode_clicked ()
 void
 Controls::frame_number_clicked ()
 {
-       PlayheadToFrameDialog* dialog = new PlayheadToFrameDialog (this, _film->video_frame_rate ());
+       PlayheadToFrameDialog* dialog = new PlayheadToFrameDialog (this, _viewer->position(), _film->video_frame_rate());
        if (dialog->ShowModal() == wxID_OK) {
                _viewer->seek (dialog->get(), true);
        }
@@ -407,7 +407,6 @@ Controls::film_change (ChangeType type, Film::Property p)
        }
 }
 
-#ifdef DCPOMATIC_PLAYER_STRESS_TEST
 void
 Controls::seek (int slider)
 {
@@ -415,4 +414,3 @@ Controls::seek (int slider)
        slider_moved (false);
        slider_released ();
 }
-#endif