summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor.cc3
-rw-r--r--gtk2_ardour/editor_summary.cc20
-rw-r--r--gtk2_ardour/editor_summary.h5
3 files changed, 24 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 881074f258..111582a44b 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -4854,14 +4854,13 @@ Editor::handle_new_route (RouteList& routes)
}
_routes->routes_added (new_views);
+ _summary->routes_added (new_views);
if (show_editor_mixer_when_tracks_arrive) {
show_editor_mixer (true);
}
editor_list_button.set_sensitive (true);
-
- _summary->set_dirty ();
}
void
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index cd4356eb75..e279da94d3 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -29,6 +29,7 @@
#include "editor_routes.h"
#include "editor_cursors.h"
#include "mouse_cursors.h"
+#include "route_time_axis.h"
using namespace std;
using namespace ARDOUR;
@@ -792,3 +793,22 @@ EditorSummary::editor_y_to_summary (double y) const
return sy;
}
+
+void
+EditorSummary::routes_added (list<RouteTimeAxisView*> const & r)
+{
+ /* Connect to gui_changed() on the routes so that we know when their colour has changed */
+ for (list<RouteTimeAxisView*>::const_iterator i = r.begin(); i != r.end(); ++i) {
+ (*i)->route()->gui_changed.connect (*this, invalidator (*this), ui_bind (&EditorSummary::route_gui_changed, this, _1), gui_context ());
+ }
+
+ set_dirty ();
+}
+
+void
+EditorSummary::route_gui_changed (string c)
+{
+ if (c == "color") {
+ set_dirty ();
+ }
+}
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index 86f2e79390..823a0ca6a8 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -1,4 +1,3 @@
-
/*
Copyright (C) 2009 Paul Davis
@@ -33,13 +32,14 @@ class Editor;
/** Class to provide a visual summary of the contents of an editor window; represents
* the whole session as a set of lines, one per region view.
*/
-class EditorSummary : public CairoWidget, public EditorComponent, public ARDOUR::SessionHandlePtr
+class EditorSummary : public CairoWidget, public EditorComponent, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
{
public:
EditorSummary (Editor *);
void set_session (ARDOUR::Session *);
void set_overlays_dirty ();
+ void routes_added (std::list<RouteTimeAxisView*> const &);
private:
@@ -79,6 +79,7 @@ private:
double editor_y_to_summary (double) const;
Position get_position (double, double) const;
void set_cursor (Position);
+ void route_gui_changed (std::string);
framepos_t _start; ///< start frame of the overview
framepos_t _end; ///< end frame of the overview