mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-22 21:27:22 +01:00
Tempo ramps - don't set incorrect lock style when changing tempo type.
- fixes random crashes when changing tempo type with right click.
This commit is contained in:
parent
71a90399fe
commit
eb70cdce1f
1 changed files with 3 additions and 6 deletions
|
|
@ -1390,7 +1390,6 @@ Editor::toggle_marker_lock_style ()
|
|||
|
||||
if (mm) {
|
||||
MeterSection* msp = &mm->meter();
|
||||
|
||||
if (mm->meter().position_lock_style() == AudioTime) {
|
||||
_session->tempo_map().replace_meter (*msp, Meter (msp->divisions_per_bar(), msp->note_divisor()), msp->bbt());
|
||||
} else {
|
||||
|
|
@ -1415,11 +1414,9 @@ Editor::toggle_tempo_type ()
|
|||
|
||||
if (tm) {
|
||||
TempoSection* tsp = &tm->tempo();
|
||||
if (tm->tempo().type() == TempoSection::Constant) {
|
||||
_session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->pulse(), TempoSection::Ramp);
|
||||
} else {
|
||||
_session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->pulse(), TempoSection::Constant);
|
||||
}
|
||||
_session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type())
|
||||
, (tsp->position_lock_style() == MusicTime) ? tsp->pulse() : tsp->frame()
|
||||
, (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue