summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-02-24 02:28:25 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-02-24 02:28:25 +0000
commit6299560116cb1e024f214f4928aa88605a5cddff (patch)
tree9c650845530407546859816d567212fc2f53a34f /gtk2_ardour/automation_line.cc
parent7e531020180affdae2d98ddd93594e7a1e9b4721 (diff)
make canvas text scale with font scaler; prevent bogus values from putting NaN's into automation lines
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3118 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 83d77490ae..64eeee9d87 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -605,6 +605,12 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
double tx = points[pi].x;
double ty = points[pi].y;
+
+ if (isnan (tx) || isnan (ty)) {
+ warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
+ _name) << endmsg;
+ continue;
+ }
/* now ensure that the control_points vector reflects the current curve
state, but don't plot control points too close together. also, don't
@@ -1198,7 +1204,7 @@ AutomationLine::reset_callback (const AutomationList& events)
AutomationList::const_iterator ai;
for (ai = events.const_begin(); ai != events.const_end(); ++ai) {
-
+
double translated_y = (*ai)->value;
model_to_view_y (translated_y);