diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2015-06-01 13:12:39 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2015-06-01 13:12:39 -0500 |
commit | cc396baf0d47079d37ffc84a483475f80c4792fc (patch) | |
tree | 387593b5c1c3776ee12c4d4699ab93671c9aaee7 | |
parent | ce69096faecd999c60f51b35e1ea9a4abc1d818c (diff) |
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.
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 8 |
2 files changed, 17 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 6934bdb2ad..2ea91ff62f 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -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); } } } diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index def38da6cb..5c106785e2 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -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; } |