correct msg in fatal error
[ardour.git] / gtk2_ardour / audio_streamview.cc
index bc5052c3907e8ac50e122fda00c16a740954383f..75f4a7fe33e4b9c14a791fe4e37c64c677098a85 100644 (file)
@@ -112,7 +112,7 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
                                                       _samples_per_pixel, region_color);
                break;
        default:
-               fatal << string_compose (_("programming error: %1"), "illegal track mode in ::add_region_view_internal") << endmsg;
+               fatal << string_compose (_("programming error: %1"), "illegal track mode in ::create_region_view()") << endmsg;
                /*NOTREACHED*/
 
        }
@@ -141,27 +141,6 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
                return 0;
        }
 
-//     if(!recording){
-//             for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
-//                     if ((*i)->region() == r) {
-//                             cerr << "audio_streamview in add_region_view_internal region found" << endl;
-                               /* great. we already have a AudioRegionView for this Region. use it again. */
-
-//                             (*i)->set_valid (true);
-
-                               // this might not be necessary
-//                             AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
-
-//                             if (arv) {
-//                                     arv->set_waveform_scale (_waveform_scale);
-//                                     arv->set_waveform_shape (_waveform_shape);
-//                             }
-
-//                             return NULL;
-//                     }
-//             }
-//     }
-
        region_views.push_front (region_view);
 
         if (_trackview.editor().internal_editing()) {
@@ -285,17 +264,21 @@ AudioStreamView::setup_rec_box ()
 
                        ArdourCanvas::Rectangle * rec_rect = new ArdourCanvas::Rectangle (_canvas_group);
                        rec_rect->set_x0 (xstart);
-                       rec_rect->set_y0 (1);
+                       rec_rect->set_y0 (0);
                        rec_rect->set_x1 (xend);
                        rec_rect->set_y1 (child_height ());
                        rec_rect->set_outline_what (ArdourCanvas::Rectangle::What (0));
                        rec_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_TimeAxisFrame());
                        rec_rect->set_fill_color (fill_color);
-                       rec_rect->lower_to_bottom();
 
                        RecBoxInfo recbox;
                        recbox.rectangle = rec_rect;
-                       recbox.start = _trackview.session()->transport_frame();
+                       
+                       if (rec_rects.empty()) {
+                               recbox.start = _trackview.session()->record_location ();
+                       } else {
+                               recbox.start = _trackview.session()->transport_frame ();
+                       }
                        recbox.length = 0;
 
                        rec_rects.push_back (recbox);