From 33de08e9e7c49881fe847addce50f54c4e37dda4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 10 Mar 2021 14:20:24 +0100 Subject: [PATCH] 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. --- gtk2_ardour/editor_ops.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index bbe45687ed..a0d2794471 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -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