13
0

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

This reverts commit c578695a64.

When hovering over a control point there is still the "Fader"
cursor shown. It is also handy to be able to directly modify
a control-point right after adding it.

A freehand draw operation can be still be initiated above,
below, or left/right of a given control point.
This commit is contained in:
Robin Gareus 2023-09-25 23:55:33 +02:00
parent eed79f45d7
commit 3cf1227421
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 10 additions and 10 deletions

View File

@ -112,7 +112,6 @@ 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

@ -637,7 +637,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 == MouseContent) {
if (eff_mouse_mode != MouseRange) {
if (event->button.button != 3) {
_mouse_changed_selection |= set_selected_control_point_from_click (press, op);
} else {
@ -1263,6 +1263,11 @@ 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 ()) {
@ -1351,10 +1356,6 @@ 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"));
@ -1364,6 +1365,10 @@ 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

@ -328,10 +328,6 @@ 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) {