13
0

make shift-leftclick on bbt ruler set that time to be 3|2|0 (experiment - GUI dialog to follow)

This commit is contained in:
Paul Davis 2021-01-31 18:31:48 -07:00
parent c8175b7c49
commit fe352311f6

View File

@ -3840,13 +3840,20 @@ BBTRulerDrag::motion (GdkEvent* event, bool first_move)
void
BBTRulerDrag::finished (GdkEvent* event, bool movement_occurred)
{
if (!movement_occurred) {
if (!_drag_valid) {
TempoMap::abort_update ();
return;
}
TempoMap::SharedPtr map (TempoMap::use());
if (!movement_occurred) {
_editor->begin_reversible_command (_("add BBT marker"));
map->set_bartime (BBT_Time (3, 2, 0), grab_time());
} else {
_editor->tempo_curve_selected (_tempo, false);
if (_tempo->clamped()) {
@ -3857,12 +3864,10 @@ BBTRulerDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->tempo_curve_selected (prev_tempo, false);
}
}
if (!movement_occurred || !_drag_valid) {
TempoMap::abort_update ();
return;
}
TempoMap::update (map);
XMLNode &after = TempoMap::use()->get_state();
_editor->session()->add_command(new MementoCommand<TempoMap>(new Temporal::TempoMap::MementoBinder(), _before_state, &after));