mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Fix crash when removing time from track with automation
Resolves : #7287
This commit is contained in:
parent
f21111d7df
commit
1519565890
1 changed files with 5 additions and 4 deletions
|
|
@ -7656,16 +7656,17 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
|
||||||
|
|
||||||
XMLNode &before = pl->get_state();
|
XMLNode &before = pl->get_state();
|
||||||
|
|
||||||
|
if (!in_command) {
|
||||||
|
begin_reversible_command (_("remove time"));
|
||||||
|
in_command = true;
|
||||||
|
}
|
||||||
|
|
||||||
std::list<AudioRange> rl;
|
std::list<AudioRange> rl;
|
||||||
AudioRange ar(pos, pos+frames, 0);
|
AudioRange ar(pos, pos+frames, 0);
|
||||||
rl.push_back(ar);
|
rl.push_back(ar);
|
||||||
pl->cut (rl);
|
pl->cut (rl);
|
||||||
pl->shift (pos, -frames, true, ignore_music_glue);
|
pl->shift (pos, -frames, true, ignore_music_glue);
|
||||||
|
|
||||||
if (!in_command) {
|
|
||||||
begin_reversible_command (_("remove time"));
|
|
||||||
in_command = true;
|
|
||||||
}
|
|
||||||
XMLNode &after = pl->get_state();
|
XMLNode &after = pl->get_state();
|
||||||
|
|
||||||
_session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
|
_session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue