Fix bug #6506, crash when moving tempo markers with automation on midi tracks
This commit is contained in:
parent
61e22d9f11
commit
9694dfc8d2
@ -3304,6 +3304,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
|
|||||||
swap_grab (&_marker->the_item(), 0, GDK_CURRENT_TIME);
|
swap_grab (&_marker->the_item(), 0, GDK_CURRENT_TIME);
|
||||||
|
|
||||||
if (!_copy) {
|
if (!_copy) {
|
||||||
|
_editor->begin_reversible_command (_("move tempo mark"));
|
||||||
TempoMap& map (_editor->session()->tempo_map());
|
TempoMap& map (_editor->session()->tempo_map());
|
||||||
/* get current state */
|
/* get current state */
|
||||||
before_state = &map.get_state();
|
before_state = &map.get_state();
|
||||||
@ -3348,7 +3349,6 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||||||
_editor->commit_reversible_command ();
|
_editor->commit_reversible_command ();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_editor->begin_reversible_command (_("move tempo mark"));
|
|
||||||
/* we removed it before, so add it back now */
|
/* we removed it before, so add it back now */
|
||||||
map.add_tempo (_marker->tempo(), when);
|
map.add_tempo (_marker->tempo(), when);
|
||||||
XMLNode &after = map.get_state();
|
XMLNode &after = map.get_state();
|
||||||
|
Loading…
Reference in New Issue
Block a user