summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-04 15:41:55 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-04 15:41:55 +0000
commitcc6016400bbd903e5d2a1720708ecde8d71f44d3 (patch)
tree41166df0d8ac89193d4b6bc3c45897267d86e36e /gtk2_ardour/automation_time_axis.cc
parentaa72da4f9ffc2f7011c2e7f801fb5c04ecbfa58f (diff)
Allow rubberband selection of MIDI automation points. Fixes
git-svn-id: svn://localhost/ardour2/branches/3.0@7535 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index e9cb98ca34..1596abfdf8 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -783,7 +783,11 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
void
AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
- if (_line && touched (top, bot)) {
+ if (!_line && !_view) {
+ return;
+ }
+
+ if (touched (top, bot)) {
double topfrac;
double botfrac;
@@ -810,8 +814,11 @@ AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double
botfrac = 1.0 - ((bot - _y_position) / height);
}
- if (_line)
+ if (_line) {
_line->get_selectables (start, end, botfrac, topfrac, results);
+ } else if (_view) {
+ _view->get_selectables (start, end, botfrac, topfrac, results);
+ }
}
}
@@ -827,6 +834,8 @@ AutomationTimeAxisView::set_selected_points (PointSelection& points)
{
if (_line) {
_line->set_selected_points (points);
+ } else if (_view) {
+ _view->set_selected_points (points);
}
}