Make split region work across edit groups even if the region is not selected when...
[ardour.git] / gtk2_ardour / ghostregion.cc
index 844338cd45c50f2df036fefd737acc6903da04e5..71bc8de69401f434a014ca055ff7b8be08a3bc23 100644 (file)
 #include "ghostregion.h"
 #include "automation_time_axis.h"
 #include "rgb_macros.h"
+#include "ardour_ui.h"
 
 using namespace Editing;
 using namespace ArdourCanvas;
+using namespace ARDOUR;
 
 GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
        : trackview (atv)
@@ -43,8 +45,8 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
        base_rect->property_y1() = (double) 0.0;
        base_rect->property_y2() = (double) trackview.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);
@@ -91,10 +93,13 @@ 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_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();
     }
 }