summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-04-03 02:05:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-04-03 02:05:34 +0000
commit4b35fc4c68fbd4845f7f8f3d2307e97412d7a4d8 (patch)
tree04aab666f44cb9787220fa76d79a3fba379655fd /gtk2_ardour/automation_time_axis.cc
parentedfc81352e66a412c6bc180c15f788512eccbe42 (diff)
audun's tempo redraw fix; sort-of cache time axis view item name widths and avoid pango-width-computation when unnecessary
git-svn-id: svn://localhost/ardour2/trunk@1657 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 69653c9c99..0da3a38fdc 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -163,6 +163,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
/* make sure labels etc. are correct */
automation_state_changed ();
+ ColorChanged.connect (mem_fun (*this, &AutomationTimeAxisView::color_handler));
}
AutomationTimeAxisView::~AutomationTimeAxisView ()
@@ -788,6 +789,42 @@ AutomationTimeAxisView::exited ()
}
void
+AutomationTimeAxisView::set_colors () {
+
+ for( list<GhostRegion *>::iterator i=ghosts.begin(); i != ghosts.end(); i++ ) {
+ (*i)->set_colors();
+ }
+
+ for( vector<AutomationLine *>::iterator i=lines.begin(); i != lines.end(); i++ ) {
+ (*i)->set_colors();
+ }
+
+}
+
+void
+AutomationTimeAxisView::color_handler (ColorID id, uint32_t val) {
+
+ switch (id) {
+ case cGhostTrackWave:
+ case cGhostTrackWaveClip:
+ case cGhostTrackZeroLine:
+
+ case cControlPoint:
+ case cControlPointFill:
+ case cControlPointOutline:
+ case cAutomationLine:
+ set_colors ();
+
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+
+void
AutomationTimeAxisView::set_state (const XMLNode& node)
{
TimeAxisView::set_state (node);