summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/automation_line.cc4
-rw-r--r--gtk2_ardour/automation_region_view.cc3
-rw-r--r--gtk2_ardour/automation_region_view.h4
3 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 2e9f988bfa..b7c39f888f 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -39,6 +39,7 @@
#include "ardour/automation_list.h"
#include "ardour/dB.h"
#include "ardour/debug.h"
+#include "ardour/parameter_types.h"
#include "ardour/tempo.h"
#include "evoral/Curve.hpp"
@@ -1171,6 +1172,9 @@ AutomationLine::view_to_model_coord_y (double& y) const
y = 2.0 * y - 1.0;
} else {
y = y * (double)(alist->get_max_y() - alist->get_min_y()) + alist->get_min_y();
+ if (ARDOUR::parameter_is_midi((ARDOUR::AutomationType)alist->parameter().type())) {
+ y = round(y);
+ }
}
}
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index e088f7c59f..0415e8c55e 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -54,7 +54,6 @@ AutomationRegionView::AutomationRegionView (ArdourCanvas::Container*
create_line(list);
}
- group->Event.connect (sigc::mem_fun (this, &AutomationRegionView::canvas_event));
group->raise_to_top();
}
@@ -96,7 +95,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
}
bool
-AutomationRegionView::canvas_event (GdkEvent* ev)
+AutomationRegionView::canvas_group_event (GdkEvent* ev)
{
PublicEditor& e = trackview.editor ();
diff --git a/gtk2_ardour/automation_region_view.h b/gtk2_ardour/automation_region_view.h
index 1dec06f0c6..0bebf12a32 100644
--- a/gtk2_ardour/automation_region_view.h
+++ b/gtk2_ardour/automation_region_view.h
@@ -64,8 +64,8 @@ protected:
void create_line(boost::shared_ptr<ARDOUR::AutomationList> list);
bool set_position(framepos_t pos, void* src, double* ignored);
void region_resized (const PBD::PropertyChange&);
- bool canvas_event(GdkEvent* ev);
- void add_automation_event (GdkEvent* event, framepos_t when, double y, bool with_guard_points);
+ bool canvas_group_event(GdkEvent* ev);
+ void add_automation_event (GdkEvent* event, framepos_t when, double y, bool with_guard_points);
void entered (bool);
void exited();