add Editor API to manage tempo map edits (at least, drags)
This commit is contained in:
parent
7ea072a4f4
commit
4db7aa6bdc
@ -1847,6 +1847,9 @@ private:
|
||||
|
||||
void reassociate_metric_markers (Temporal::TempoMap::SharedPtr const &);
|
||||
void reassociate_metric_marker (Temporal::TempoMap::SharedPtr const & tmap, Temporal::TempoMap::Metrics & metric, ArdourMarker& marker);
|
||||
void begin_tempo_map_edit ();
|
||||
void abort_tempo_map_edit ();
|
||||
void commit_tempo_map_edit ();
|
||||
void tempo_map_changed ();
|
||||
|
||||
void redisplay_grid (bool immediate_redraw);
|
||||
|
@ -626,3 +626,28 @@ Editor::real_remove_meter_marker (Temporal::MeterPoint *section)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
Editor::begin_tempo_map_edit ()
|
||||
{
|
||||
TempoMap::fetch_writable ();
|
||||
TempoMap::SharedPtr tmap (TempoMap::use());
|
||||
reassociate_metric_markers (tmap);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::abort_tempo_map_edit ()
|
||||
{
|
||||
/* this drops the lock held while we have a writable copy in our per-thread pointer */
|
||||
TempoMap::abort_update ();
|
||||
|
||||
TempoMap::SharedPtr tmap (TempoMap::fetch());
|
||||
reassociate_metric_markers (tmap);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::commit_tempo_map_edit ()
|
||||
{
|
||||
TempoMap::SharedPtr tmap (TempoMap::use());
|
||||
TempoMap::update (tmap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user