summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_summary.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-10-29 16:07:13 +0100
committerRobin Gareus <robin@gareus.org>2014-10-29 16:07:13 +0100
commit1d0612ceb6e9a373500307a4d51d96c1c37e185b (patch)
tree9119bf0db59893cf96d4b885456439ec46160f8d /gtk2_ardour/editor_summary.cc
parentfdedf7153ece6bb04ac67d077eaeb28685baaaff (diff)
redraw summary when theme preference changes & consolidate code.
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r--gtk2_ardour/editor_summary.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index 85aed8291f..cc9f1a6783 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -21,6 +21,7 @@
#include "canvas/debug.h"
+#include "ardour_ui.h"
#include "time_axis_view.h"
#include "streamview.h"
#include "editor_summary.h"
@@ -60,6 +61,8 @@ EditorSummary::EditorSummary (Editor* e)
{
add_events (Gdk::POINTER_MOTION_MASK|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
set_flags (get_flags() | Gtk::CAN_FOCUS);
+
+ ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &EditorSummary::parameter_changed));
}
EditorSummary::~EditorSummary ()
@@ -67,6 +70,15 @@ EditorSummary::~EditorSummary ()
cairo_surface_destroy (_image);
}
+void
+EditorSummary::parameter_changed (string p)
+{
+
+ if (p == "color-regions-using-track-color") {
+ set_background_dirty ();
+ }
+}
+
/** Handle a size allocation.
* @param alloc GTK allocation.
*/
@@ -74,8 +86,7 @@ void
EditorSummary::on_size_allocate (Gtk::Allocation& alloc)
{
CairoWidget::on_size_allocate (alloc);
- _background_dirty = true;
- set_dirty ();
+ set_background_dirty ();
}
@@ -1035,16 +1046,14 @@ EditorSummary::routes_added (list<RouteTimeAxisView*> const & r)
}
}
- _background_dirty = true;
- set_dirty ();
+ set_background_dirty ();
}
void
EditorSummary::route_gui_changed (string c)
{
if (c == "color") {
- _background_dirty = true;
- set_dirty ();
+ set_background_dirty ();
}
}