remove/delete current mixer strip when session is deleted
[ardour.git] / gtk2_ardour / ghostregion.cc
index 844338cd45c50f2df036fefd737acc6903da04e5..41911f27d37e933483ef5194111c03dc937c2e35 100644 (file)
@@ -22,6 +22,7 @@
 #include "ghostregion.h"
 #include "automation_time_axis.h"
 #include "rgb_macros.h"
+#include "ardour_ui.h"
 
 using namespace Editing;
 using namespace ArdourCanvas;
@@ -41,10 +42,10 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
        base_rect = new ArdourCanvas::SimpleRect (*group);
        base_rect->property_x1() = (double) 0.0;
        base_rect->property_y1() = (double) 0.0;
-       base_rect->property_y2() = (double) trackview.height;
+       base_rect->property_y2() = (double) trackview.current_height();
        base_rect->property_outline_what() = (guint32) 0;
-       base_rect->property_outline_color_rgba() = color_map[cGhostTrackBaseOutline];
-       base_rect->property_fill_color_rgba() = color_map[cGhostTrackBaseFill];
+       base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
+       base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
        group->lower_to_bottom ();
 
        atv.add_ghost (this);
@@ -78,8 +79,8 @@ GhostRegion::set_height ()
        vector<WaveView*>::iterator i;
        uint32_t n;
 
-       base_rect->property_y2() = (double) trackview.height;
-       ht = ((trackview.height) / (double) waves.size());
+       base_rect->property_y2() = (double) trackview.current_height();
+       ht = ((trackview.current_height()) / (double) waves.size());
        
        for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
                gdouble yoff = n * ht;
@@ -91,10 +92,14 @@ GhostRegion::set_height ()
 void
 GhostRegion::set_colors ()
 {
+       base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
+       base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GhostTrackBase.get();
+
     for (uint32_t n=0; n < waves.size(); ++n) {
-       waves[n]->property_wave_color() = color_map[cGhostTrackWave];
+       waves[n]->property_wave_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWave.get();
+       waves[n]->property_fill_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWave.get();
 
-       waves[n]->property_clip_color() = color_map[cGhostTrackWaveClip];
-       waves[n]->property_zero_color() = color_map[cGhostTrackZeroLine];
+       waves[n]->property_clip_color() = ARDOUR_UI::config()->canvasvar_GhostTrackWaveClip.get();
+       waves[n]->property_zero_color() = ARDOUR_UI::config()->canvasvar_GhostTrackZeroLine.get();
     }
 }