13
0

In Draw mode, do not allow to grab lines.

see also 3cf1227421 and c578695a64
This commit is contained in:
Robin Gareus 2023-09-26 17:03:09 +02:00
parent 1f937fa0b1
commit 201b9574a2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 5 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

@ -689,7 +689,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
break;
case AutomationLineItem:
if (eff_mouse_mode != MouseRange) {
if (eff_mouse_mode != MouseRange && eff_mouse_mode != MouseDraw) {
AutomationLine* al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
std::list<Selectable*> selectables;
double mx = event->button.x;
@ -1356,6 +1356,8 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
}
case AutomationLineItem:
/* fallthrough */
case AutomationTrackItem:
{
AutomationTimeAxisView* atv = static_cast<AutomationTimeAxisView*> (item->get_data ("trackview"));
@ -1365,10 +1367,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()) {