}
void
-Content::set_position (shared_ptr<const Film> film, DCPTime p)
+Content::set_position (shared_ptr<const Film> film, DCPTime p, bool force_emit)
{
/* video and audio content can modify its position */
{
boost::mutex::scoped_lock lm (_mutex);
- if (p == _position) {
+ if (p == _position && !force_emit) {
cc.abort ();
return;
}
return _digest;
}
- void set_position (boost::shared_ptr<const Film> film, DCPTime);
+ void set_position (boost::shared_ptr<const Film> film, DCPTime, bool force_emit = false);
/** DCPTime that this content starts; i.e. the time that the first
* bit of the content (trimmed or not) will happen.
}
_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 ();
}
void
-Timeline::set_position_from_event (wxMouseEvent& ev)
+Timeline::set_position_from_event (wxMouseEvent& ev, bool force_emit)
{
if (!_pixels_per_second) {
return;
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);
}
/*
- Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
void film_content_change (ChangeType type, int, bool frequent);
void resized ();
void assign_tracks ();
- void set_position_from_event (wxMouseEvent &);
+ void set_position_from_event (wxMouseEvent& ev, bool force_emit = false);
void clear_selection ();
void recreate_views ();
void setup_scrollbars ();