Do not commit empty split undo transactions

When no region(s) are selected and none are under the edit-point,
only a selection change was committed as undo action.
This commit is contained in:
Robin Gareus 2021-03-10 14:20:24 +01:00
parent d5eaeb041b
commit 33de08e9e7
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -285,6 +285,11 @@ Editor::split_regions_at (MusicSample where, RegionSelection& regions)
EditorThaw(); /* Emit Signal */
}
if (_session->abort_empty_reversible_command ()) {
/* no change was made */
return;
}
RegionSelectionAfterSplit rsas = Config->get_region_selection_after_split();
//if the user has "Clear Selection" as their post-split behavior, then clear the selection