13
0

in draw mode, mouse drags in automation tracks are always freehand drawing

This commit is contained in:
Paul Davis 2023-08-18 17:39:44 -06:00
parent b354f41fc2
commit c578695a64
3 changed files with 10 additions and 10 deletions

View File

@ -112,6 +112,7 @@ AutomationLine::AutomationLine (const string& name,
line = new ArdourCanvas::PolyLine (group);
CANVAS_DEBUG_NAME (line, "region gain envelope line");
line->set_data ("line", this);
line->set_data ("trackview", &trackview);
line->set_outline_width (2.0);
line->set_covers_threshold (4.0);

View File

@ -619,7 +619,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
case ControlPointItem:
/* for object/track exclusivity, we don't call set_selected_track_as_side_effect (op); */
if (eff_mouse_mode != MouseRange) {
if (eff_mouse_mode == MouseContent) {
if (event->button.button != 3) {
_mouse_changed_selection |= set_selected_control_point_from_click (press, op);
} else {
@ -1242,11 +1242,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drags->set (new LineDrag (this, item), event);
return true;
case ControlPointItem:
_drags->set (new ControlPointDrag (this, item), event);
return true;
break;
case SelectionItem:
{
if (selection->time.empty ()) {
@ -1335,6 +1330,10 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
}
case ControlPointItem:
item = &(static_cast<ControlPoint*> (item->get_data ("control_point"))->line().grab_item());
/*fallthrough*/
case AutomationLineItem:
case AutomationTrackItem:
{
AutomationTimeAxisView* atv = static_cast<AutomationTimeAxisView*> (item->get_data ("trackview"));
@ -1344,10 +1343,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
break;
case AutomationLineItem:
_drags->set (new LineDrag (this, item), event);
break;
case NoteItem:
if ((note = reinterpret_cast<NoteBase*>(item->get_data ("notebase")))) {
if (note->big_enough_to_trim() && note->mouse_near_ends()) {

View File

@ -327,6 +327,10 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
return false;
}
if (mouse_mode != Editing::MouseContent) {
return false;
}
bool ret = false;
switch (op) {