13
0

Fix some visual loopholes when switching tools inside a region:

switching to Grab should show the fade handles...
...switching away from grab should hide them.
Also, change "always show gain" preference to show lines, but not control points.
This commit is contained in:
Ben Loftis 2015-06-01 13:12:39 -05:00
parent ce69096fae
commit cc396baf0d
2 changed files with 17 additions and 2 deletions

View File

@ -1049,10 +1049,10 @@ AudioRegionView::update_envelope_visibility ()
return;
}
if (ARDOUR_UI::config()->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseContent ) {
if (trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseContent ) {
gain_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::ControlPoints|AutomationLine::Line));
gain_line->canvas_group().raise_to_top ();
} else if (trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
} else if (ARDOUR_UI::config()->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
gain_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::Line));
gain_line->canvas_group().raise_to_top ();
} else {
@ -1342,6 +1342,13 @@ AudioRegionView::entered ()
fade_out_trim_handle->hide ();
}
}
} else { //this happens when we switch tools; if we switch away from Grab mode, hide all the fade handles
if (fade_in_handle) { fade_in_handle->hide(); }
if (fade_out_handle) { fade_out_handle->hide(); }
if (fade_in_trim_handle) { fade_in_trim_handle->hide(); }
if (fade_out_trim_handle) { fade_out_trim_handle->hide(); }
if (start_xfade_rect) { start_xfade_rect->set_outline (false); }
if (end_xfade_rect) { end_xfade_rect->set_outline (false); }
}
}

View File

@ -1659,6 +1659,14 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
case SelectionItem:
break;
case WaveItem:
{
if (entered_regionview) {
entered_regionview->entered();
}
}
break;
default:
break;
}