diff options
author | Carl Hetherington <carl@carlh.net> | 2009-04-30 17:07:57 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-04-30 17:07:57 +0000 |
commit | 57e1c287509d9a6f1d8b3b64000625b68a8b997a (patch) | |
tree | f487f2a1bbf3236fdca0526c596aea3c0d91924b /gtk2_ardour/editor_ops.cc | |
parent | 9ec372879601dc946b90ed5be8c426c06edc1d23 (diff) |
Preview effect of strip silence within the dialog.
git-svn-id: svn://localhost/ardour2/branches/3.0@5017 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 66286b62f0..b1ad57f9cd 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4669,7 +4669,23 @@ Editor::strip_region_silence () return; } - StripSilenceDialog d; + RegionSelection rs; + get_regions_for_action (rs); + + if (rs.empty()) { + return; + } + + std::list<boost::shared_ptr<AudioRegion> > ar; + + for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) { + AudioRegionView* const arv = dynamic_cast<AudioRegionView*> (*i); + if (arv) { + ar.push_back (arv->audio_region ()); + } + } + + StripSilenceDialog d (ar); int const r = d.run (); if (r == Gtk::RESPONSE_OK) { |