summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/film_viewer.cc8
-rw-r--r--src/wx/film_viewer.h2
-rw-r--r--src/wx/timeline.cc24
-rw-r--r--src/wx/timeline.h1
4 files changed, 31 insertions, 4 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index cb5e6b4c2..cd331a25a 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -129,7 +129,7 @@ FilmViewer::set_film (shared_ptr<Film> f)
_player = f->player ();
_player->disable_audio ();
_player->Video.connect (boost::bind (&FilmViewer::process_video, this, _1, _3));
- _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this));
+ _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
calculate_sizes ();
fetch_current_frame_again ();
@@ -377,8 +377,12 @@ FilmViewer::forward_clicked (wxCommandEvent &)
}
void
-FilmViewer::player_changed ()
+FilmViewer::player_changed (bool frequent)
{
+ if (frequent) {
+ return;
+ }
+
calculate_sizes ();
fetch_current_frame_again ();
}
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 28fc4971d..5c8320295 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -66,7 +66,7 @@ private:
void active_jobs_changed (bool);
void back_clicked (wxCommandEvent &);
void forward_clicked (wxCommandEvent &);
- void player_changed ();
+ void player_changed (bool);
boost::shared_ptr<Film> _film;
boost::shared_ptr<Player> _player;
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 4e0737b41..7f3c1996b 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -493,12 +493,28 @@ Timeline::left_down (wxMouseEvent& ev)
_left_down = true;
_down_point = ev.GetPosition ();
_first_move = false;
+
+ if (_down_view) {
+ shared_ptr<Content> c = _down_view->content().lock ();
+ if (c) {
+ c->set_change_signals_frequent (true);
+ }
+ }
}
void
-Timeline::left_up (wxMouseEvent &)
+Timeline::left_up (wxMouseEvent& ev)
{
_left_down = false;
+
+ if (_down_view) {
+ shared_ptr<Content> c = _down_view->content().lock ();
+ if (c) {
+ c->set_change_signals_frequent (false);
+ }
+ }
+
+ set_start_from_event (ev);
}
void
@@ -508,6 +524,12 @@ Timeline::mouse_moved (wxMouseEvent& ev)
return;
}
+ set_start_from_event (ev);
+}
+
+void
+Timeline::set_start_from_event (wxMouseEvent& ev)
+{
wxPoint const p = ev.GetPosition();
if (!_first_move) {
diff --git a/src/wx/timeline.h b/src/wx/timeline.h
index 3e984bfe1..0470ed7b9 100644
--- a/src/wx/timeline.h
+++ b/src/wx/timeline.h
@@ -70,6 +70,7 @@ private:
void setup_pixels_per_time_unit ();
void resized (wxSizeEvent &);
void assign_tracks ();
+ void set_start_from_event (wxMouseEvent &);
FilmEditor* _film_editor;
boost::weak_ptr<Film> _film;