Skip to content

Commit

Permalink
Show control point context menu on automation lines
Browse files Browse the repository at this point in the history
Right clicking an automation line will select both ends of it and make
control point operations perfectly relevant.
  • Loading branch information
kiilerix committed Oct 24, 2022
1 parent 8ce40c6 commit a0d5fb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gtk2_ardour/editor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6593,9 +6593,10 @@ Editor::popup_control_point_context_menu (ArdourCanvas::Item* item, GdkEvent* ev

items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun (*this, &Editor::edit_control_point), item)));
items.push_back (MenuElem (_("Delete"), sigc::bind (sigc::mem_fun (*this, &Editor::remove_control_point), item)));
/* Don't insensitivate for AudioRegionGainLine and AutomationLine */
ControlPoint * control_point;
if (((control_point = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))) == 0)
|| !can_remove_control_point (*control_point)) {
if (((control_point = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))))
&& !can_remove_control_point (*control_point)) {
items.back().set_sensitive (false);
}

Expand Down
2 changes: 2 additions & 0 deletions gtk2_ardour/editor_mouse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,8 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
popup_track_context_menu (1, event->button.time, item_type, false);
break;

case GainLineItem:
case AutomationLineItem:
case ControlPointItem:
popup_control_point_context_menu (item, event);
break;
Expand Down

0 comments on commit a0d5fb3

Please sign in to comment.