Two issues:
1) AutomationRegionView not receiving events (CC breakage).
2) Entered values must be rounded to integer for MIDI controllers. This should
be done more generically with ParameterDescriptor for all controls (also
supporting boolean toggles and such), once ParameterDescriptor becomes more
pervasive and takes over Evoral::Parameter, but this will do for now.
#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"
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);
+ }
}
}
create_line(list);
}
- group->Event.connect (sigc::mem_fun (this, &AutomationRegionView::canvas_event));
group->raise_to_top();
}
}
bool
-AutomationRegionView::canvas_event (GdkEvent* ev)
+AutomationRegionView::canvas_group_event (GdkEvent* ev)
{
PublicEditor& e = trackview.editor ();
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();