Merged with trunk R1612.
[ardour.git] / libs / ardour / audioregion.cc
index 38f8ed3652dc966cd6137952a412054a58ddda09..8bb40e9bcb011e9cf7aa109bae7ccd8fa976b066 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <cmath>
@@ -41,7 +40,6 @@
 #include <ardour/playlist.h>
 #include <ardour/audiofilter.h>
 #include <ardour/audiofilesource.h>
-#include <ardour/destructive_filesource.h>
 #include <ardour/region_factory.h>
 
 #include "i18n.h"
@@ -932,10 +930,15 @@ AudioRegion::separate_by_channel (Session& session, vector<boost::shared_ptr<Aud
                        new_name += ('0' + n + 1);
                }
 
-               /* create a copy with just one source */
+               /* create a copy with just one source. prevent if from being thought of as "whole file" even if 
+                  it covers the entire source file(s).
+                */
+
+               Flag f = Flag (_flags & ~WholeFile);
 
-               boost::shared_ptr<Region> r = RegionFactory::create (srcs, _start, _length, new_name, _layer, _flags);
+               boost::shared_ptr<Region> r = RegionFactory::create (srcs, _start, _length, new_name, _layer, f);
                boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (r);
+               cerr << "new region name is " << ar->name() << endl;
 
                v.push_back (ar);
                
@@ -1096,6 +1099,7 @@ AudioRegion::normalize_to (float target_dB)
        boost::shared_ptr<Playlist> pl (playlist());
 
        if (pl) {
+               cerr << "Send modified\n";
                pl->Modified();
        }