From d4e209eefeb90ad8b4d87f3595e25810494a1ab7 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 8 Mar 2011 01:49:13 +0000 Subject: [PATCH] show internal edit mode status correctly on session load git-svn-id: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@9101 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_streamview.cc | 6 ++++++ gtk2_ardour/editor.cc | 6 ++++++ gtk2_ardour/midi_streamview.cc | 9 ++++++++- gtk2_ardour/midi_time_axis.cc | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index abfa767c9..8e54c6c93 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -191,6 +191,12 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr r, bool wai region_views.push_front (region_view); + if (_trackview.editor().internal_editing()) { + region_view->hide_rect (); + } else { + region_view->show_rect (); + } + /* catch region going away */ r->DropReferences.connect (*this, invalidator (*this), boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr (r)), gui_context()); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 36154b82d..22aba4681 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4945,6 +4945,12 @@ Editor::handle_new_route (RouteList& routes) rtv->effective_gain_display (); + if (internal_editing()) { + rtv->enter_internal_edit_mode (); + } else { + rtv->leave_internal_edit_mode (); + } + rtv->view()->RegionViewAdded.connect (sigc::mem_fun (*this, &Editor::region_view_added)); rtv->view()->RegionViewRemoved.connect (sigc::mem_fun (*this, &Editor::region_view_removed)); } diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 56e34c8a7..b79a6dc6d 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -172,6 +172,12 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr r, bool wfd, region_views.push_front (region_view); + if (_trackview.editor().internal_editing()) { + region_view->hide_rect (); + } else { + region_view->show_rect (); + } + /* display events and find note range */ display_region (region_view, wfd); @@ -186,8 +192,9 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr r, bool wfd, void MidiStreamView::display_region(MidiRegionView* region_view, bool load_model) { - if ( ! region_view) + if (!region_view) { return; + } region_view->enable_display(true); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index a1e8ef1f0..bf0adfd36 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -249,7 +249,7 @@ MidiTimeAxisView::enter_internal_edit_mode () { if (midi_view()) { midi_view()->enter_internal_edit_mode (); - } + } } void -- 2.11.4.GIT