More fixes for range-based automation editing.

-Remove redundant start_grab calls.
-Show gain curves in Range mode, so you can see the curves you are selecting
This commit is contained in:
Ben Loftis 2014-08-06 14:43:40 -05:00
parent 16ca4e0f9a
commit 1873bcfa9d
3 changed files with 2 additions and 4 deletions

View file

@ -1053,7 +1053,7 @@ AudioRegionView::update_envelope_visibility ()
return;
}
if (Config->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseGain) {
if (Config->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseGain || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
gain_line->add_visibility (AutomationLine::Line);
} else {
gain_line->hide ();

View file

@ -1068,7 +1068,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
AudioRegionView* arv = dynamic_cast<AudioRegionView *> (clicked_regionview);
if (arv) {
_drags->set (new AutomationRangeDrag (this, arv, selection->time), event, _cursors->up_down);
_drags->start_grab (event);
} else {
double const y = event->button.y;
pair<TimeAxisView*, int> tvp = trackview_by_y_position (y);
@ -1077,7 +1076,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if ( atv) {
/* smart "join" mode: drag automation */
_drags->set (new AutomationRangeDrag (this, atv, selection->time), event, _cursors->up_down);
_drags->start_grab (event);
}
}
}

View file

@ -467,7 +467,7 @@ ControlList::editor_add (double when, double value)
ControlEvent cp (when, 0.0f);
iterator i = lower_bound (_events.begin(), _events.end(), &cp, time_comparator);
DEBUG_TRACE (DEBUG::ControlList, string_compose ("editor_add: actually add when= %1 value= %1\n", when, value));
DEBUG_TRACE (DEBUG::ControlList, string_compose ("editor_add: actually add when= %1 value= %2\n", when, value));
_events.insert (i, new ControlEvent (when, value));
mark_dirty ();