summaryrefslogtreecommitdiff
path: root/src/wx/timeline.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-04-26 22:31:24 +0100
committerCarl Hetherington <cth@carlh.net>2019-04-26 22:31:24 +0100
commitaafa1cc676b6bd4d333f0ff3a09e1effabf979c3 (patch)
tree52bd25097ea5131338c0b3c62a37dffa265cea2b /src/wx/timeline.cc
parente7e7035f800accbb09ac99aa26d15bff22588d0b (diff)
Make sure at least one position change event is emitted after
a timeline drag (with frequent=false), even if lots have been sent with frequent=true. Otherwise the code in the CHNAGE_TYPE_DONE branch of Butler::player_change never gets to seek (since frequent is true, it ignores the signal). Without the seek things go wrong. Believed to fix #1534.
Diffstat (limited to 'src/wx/timeline.cc')
-rw-r--r--src/wx/timeline.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 1c1da708e..de5f05ae7 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -568,7 +568,12 @@ Timeline::left_up_select (wxMouseEvent& ev)
}
_content_panel->set_selection (selected_content ());
- set_position_from_event (ev);
+ /* Since we may have just set change signals back to `not-frequent', we have to
+ make sure this position change is signalled, even if the position value has
+ not changed since the last time it was set (with frequent=true). This is
+ a bit of a hack.
+ */
+ set_position_from_event (ev, true);
/* Clear up up the stuff we don't do during drag */
assign_tracks ();
@@ -704,7 +709,7 @@ Timeline::maybe_snap (DCPTime a, DCPTime b, optional<DCPTime>& nearest_distance)
}
void
-Timeline::set_position_from_event (wxMouseEvent& ev)
+Timeline::set_position_from_event (wxMouseEvent& ev, bool force_emit)
{
if (!_pixels_per_second) {
return;
@@ -763,7 +768,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
new_position = DCPTime ();
}
- _down_view->content()->set_position (film, new_position);
+ _down_view->content()->set_position (film, new_position, force_emit);
film->set_sequence (false);
}