modified fix from carl for region copy-moves-original-to-start bug; change verbose...
[ardour.git] / gtk2_ardour / editor_region_list.cc
index 56196623eddd5897549956eca5be7953b8b1bb9c..df23ac503cbc2dff44cb3056324461dc2b8ba68d 100644 (file)
@@ -21,6 +21,7 @@
 #include <cmath>
 #include <algorithm>
 #include <string>
+#include <sstream>
 
 #include <pbd/basename.h>
 
@@ -138,12 +139,13 @@ Editor::add_audio_region_to_region_display (boost::shared_ptr<AudioRegion> regio
                if (region->source()->name()[0] == '/') { // external file
 
                        if (region->whole_file()) {
-                               str = ".../";
 
                                boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource>(region->source());
 
+                               str = ".../";
+
                                if (afs) {
-                                       str += region_name_from_path (afs->path(), region->n_channels() > 1);
+                                       str = region_name_from_path (afs->path(), region->n_channels() > 1);
                                } else {
                                        str += region->source()->name();
                                }
@@ -158,6 +160,14 @@ Editor::add_audio_region_to_region_display (boost::shared_ptr<AudioRegion> regio
 
                }
 
+               if (region->n_channels() > 1) {
+                       std::stringstream foo;
+                       foo << region->n_channels ();
+                       str += " [";
+                       str += foo.str();
+                       str += ']';
+               }
+
                if (missing_source) {
                        str += _(" (MISSING)");
                }