Fix some visual loopholes when switching tools inside a region:
authorBen Loftis <ben@harrisonconsoles.com>
Mon, 1 Jun 2015 18:12:39 +0000 (13:12 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Mon, 1 Jun 2015 18:12:39 +0000 (13:12 -0500)
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.

gtk2_ardour/audio_region_view.cc
gtk2_ardour/editor_mouse.cc

index 6934bdb2ad8099a4b9257cdaeec06e5ed5a9a314..2ea91ff62f8e349e59f13a3cb2eb2dd1238c34c9 100644 (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); }
        }
 }
 
index def38da6cb5bac027ff7d4678bc242cd820a5d7f..5c106785e28559efafe7ee60fcb8c79c22680abb 100644 (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;
        }