improved fix for #7208, hopefully
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Feb 2017 19:00:36 +0000 (20:00 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Feb 2017 19:00:36 +0000 (20:00 +0100)
gtk2_ardour/editor_ops.cc

index bbc78adf4a05759849f38cd6da30c6a5544e15e6..6f4c3610fb0e3d590b132d1e35399fb82f9c54b7 100644 (file)
@@ -7085,11 +7085,14 @@ Editor::close_region_gaps ()
 
                (*r)->region()->clear_changes ();
                (*r)->region()->trim_front( (position - pull_back_frames));
+
+               last_region->clear_changes ();
                last_region->trim_end( (position - pull_back_frames + crossfade_len));
 
                _session->add_command (new StatefulDiffCommand ((*r)->region()));
-               last_region = (*r)->region();
+               _session->add_command (new StatefulDiffCommand (last_region));
 
+               last_region = (*r)->region();
                idx++;
        }