Fix uninitialized variable
[ardour.git] / gtk2_ardour / stripable_colorpicker.cc
index 4e8fe339d476a43f03643f3d943420980a1e77b6..c2dfbbb438cf4c930bed96f69552f9bcb1b7f1ea 100644 (file)
  */
 
 #include "pbd/compose.h"
-#include "pbd/i18n.h"
 
+#include "public_editor.h"
 #include "stripable_colorpicker.h"
 #include "ui_config.h"
 #include "utils.h"
 
+#include "pbd/i18n.h"
+
 using namespace Gtk;
 using namespace ARDOUR_UI_UTILS;
 
@@ -142,10 +144,15 @@ StripableColorDialog::popup (boost::shared_ptr<ARDOUR::Stripable> s)
 void
 StripableColorDialog::finish_color_edit (int response)
 {
+       ARDOUR::RouteList rl = PublicEditor::instance().get_selection().tracks.routelist();
+
        if (response == RESPONSE_OK) {
                ColorChanged (gdk_color_to_rgba (get_colorsel()->get_current_color())); /* EMIT SIGNAL */
        }
        if (_stripable && response == RESPONSE_OK) {
+               for (ARDOUR::RouteList::iterator i = rl.begin(); i != rl.end(); ++i) {
+                       (*i)->presentation_info().set_color (gdk_color_to_rgba (get_colorsel()->get_current_color()));
+               }
                _stripable->presentation_info().set_color (gdk_color_to_rgba (get_colorsel()->get_current_color()));
        } else if (_stripable) {
                _stripable->presentation_info().set_color (_initial_color);