summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2008-12-23 10:36:06 +0000
committerCarl Hetherington <carl@carlh.net>2008-12-23 10:36:06 +0000
commit510d6d6dd368f4c1c6de83b766fd403eb0044c11 (patch)
tree25f6bf11ea8370ec54a4aec4b65351b90ec9d663 /gtk2_ardour/automation_line.cc
parente9a9fe30cf8661aeb48b5392d5e8f5c3f432b809 (diff)
Make region gain envelope drawing work again.
git-svn-id: svn://localhost/ardour2/branches/3.0@4339 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 5e8d2c5514..bc2c609b03 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -84,7 +84,8 @@ AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanv
trackview.session().register_with_memento_command_factory(alist->id(), this);
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
set_uses_gain_mapping (true);
}
@@ -1245,7 +1246,8 @@ void
AutomationLine::view_to_model_y (double& y) const
{
/* TODO: This should be more generic ... */
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
y = slider_position_to_gain (y);
y = max (0.0, y);
y = min (2.0, y);
@@ -1263,7 +1265,8 @@ void
AutomationLine::model_to_view_y (double& y) const
{
/* TODO: This should be more generic ... */
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
y = gain_to_slider_position (y);
} else if (alist->parameter().type() == PanAutomation) {
// vertical coordinate axis reversal