summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryonideshi <finarfinek@gmail.com>2016-03-04 22:24:06 +0100
committerRobin Gareus <robin@gareus.org>2016-03-05 15:54:47 +0100
commitc1ce5dd9ec12a5e897ad838d90ad4ff6c6bbbff0 (patch)
treee2cc3a154f1a50b87bd2df68aaf4b6579bdae209
parentbf83093f43ac13bcadece6e451055d50c59e7787 (diff)
Fix for issue #0006803
-rw-r--r--gtk2_ardour/editor_ops.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index c8b09efe86..12a7f2ac91 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -5160,12 +5160,13 @@ Editor::strip_region_silence ()
StripSilenceDialog d (_session, audio_only);
int const r = d.run ();
- d.drop_rects ();
+ d.drop_rects ();
- if (r == Gtk::RESPONSE_OK) {
- ARDOUR::AudioIntervalMap silences;
- d.silences (silences);
+ if (r == Gtk::RESPONSE_OK) {
+ ARDOUR::AudioIntervalMap silences;
+ d.silences (silences);
StripSilence s (*_session, silences, d.fade_length());
+
apply_filter (s, _("strip silence"), &d);
}
}
@@ -5440,6 +5441,11 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
playlist->clear_changes ();
playlist->clear_owned_changes ();
+ if (!in_command) {
+ begin_reversible_command (command);
+ in_command = true;
+ }
+
if (filter.results.empty ()) {
/* no regions returned; remove the old one */
@@ -5460,14 +5466,10 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
}
}
+
/* We might have removed regions, which alters other regions' layering_index,
so we need to do a recursive diff here.
*/
-
- if (!in_command) {
- begin_reversible_command (command);
- in_command = true;
- }
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);