diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-15 14:29:32 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-15 14:29:32 -0500 |
commit | 9aacefc17010a889222425f97b99050171165038 (patch) | |
tree | a1a80ed3557caa2b223274fd33f54df35252ee5f /gtk2_ardour/automation_line.cc | |
parent | 96586e81f40e883a7807c88eaa7df73b60140352 (diff) | |
parent | 79b56b1d3319d03d14b2d3e2f8d6cd7b3e797deb (diff) |
merge with master
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index a4d58cb531..8a11f199af 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1153,9 +1153,10 @@ AutomationLine::view_to_model_coord_y (double& y) const y = max (0.0, y); y = min (2.0, y); } else if (alist->parameter().type() == PanAzimuthAutomation || - alist->parameter().type() == PanElevationAutomation || - alist->parameter().type() == PanWidthAutomation) { + alist->parameter().type() == PanElevationAutomation) { y = 1.0 - y; + } else if (alist->parameter().type() == PanWidthAutomation) { + y = 2.0 * y - 1.0; } else if (alist->parameter().type() == PluginAutomation) { y = y * (double)(alist->get_max_y()- alist->get_min_y()) + alist->get_min_y(); } else { @@ -1171,10 +1172,10 @@ AutomationLine::model_to_view_coord (double& x, double& y) const alist->parameter().type() == EnvelopeAutomation) { y = gain_to_slider_position_with_max (y, Config->get_max_gain()); } else if (alist->parameter().type() == PanAzimuthAutomation || - alist->parameter().type() == PanElevationAutomation || - alist->parameter().type() == PanWidthAutomation) { - // vertical coordinate axis reversal + alist->parameter().type() == PanElevationAutomation) { y = 1.0 - y; + } else if (alist->parameter().type() == PanWidthAutomation) { + y = .5 + y * .5; } else if (alist->parameter().type() == PluginAutomation) { y = (y - alist->get_min_y()) / (double)(alist->get_max_y()- alist->get_min_y()); } else { |