mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 20:56:28 +01:00
more functional tempo mapping
TempoMarker drag modifies tempo (and thus beat-time positions and durations). BBTRuler drag modifies the map but not positions/durations
This commit is contained in:
parent
45490bf43f
commit
38bb89c110
3 changed files with 46 additions and 39 deletions
|
|
@ -3489,7 +3489,7 @@ BBTRulerDrag::BBTRulerDrag (Editor* e, ArdourCanvas::Item* i)
|
|||
void
|
||||
BBTRulerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||
{
|
||||
map = _editor->begin_tempo_map_edit ();
|
||||
map = _editor->begin_tempo_mapping ();
|
||||
|
||||
Drag::start_grab (event, cursor);
|
||||
|
||||
|
|
@ -3598,26 +3598,28 @@ BBTRulerDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||
}
|
||||
}
|
||||
|
||||
XMLNode &after = map->get_state();
|
||||
|
||||
_editor->session()->add_command (new Temporal::TempoCommand (_("move BBT point"), _before_state, &after));
|
||||
_editor->commit_reversible_command ();
|
||||
|
||||
/* 2nd argument means "update tempo map display after the new map is
|
||||
* installed. We need to do this because the code above has not
|
||||
* actually changed anything about how tempo is displayed, it simply
|
||||
* modified the map.
|
||||
*/
|
||||
|
||||
_editor->commit_tempo_map_edit (map, true);
|
||||
|
||||
XMLNode &after = map->get_state();
|
||||
|
||||
_editor->session()->add_command (new Temporal::TempoCommand (_("move BBT point"), _before_state, &after));
|
||||
_editor->commit_reversible_command ();
|
||||
_editor->commit_tempo_mapping (map);
|
||||
}
|
||||
|
||||
void
|
||||
BBTRulerDrag::aborted (bool moved)
|
||||
{
|
||||
TempoMap::abort_update ();
|
||||
_editor->abort_tempo_mapping ();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
TempoTwistDrag::TempoTwistDrag (Editor* e, ArdourCanvas::Item* i)
|
||||
: Drag (e, i, Temporal::BeatTime)
|
||||
, _tempo (0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue