From 00438c9c7ffab85c899352de6c6017798aca6074 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 13 Sep 2010 18:26:56 +0000 Subject: [PATCH] possible fix (by rearrangement) for #3424 git-svn-id: svn://localhost/ardour2/branches/3.0@7767 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 58f66fcd8a..1ccdbec4d7 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1781,13 +1781,19 @@ Editor::add_region_context_items (StreamView* sv, list } if (ar) { + /* its a bit unfortunate that "envelope visible" is a view-only + property. we have to find the regionview to able to check + its current setting. + */ + RegionView* rv = sv->find_view (ar); - AudioRegionView* arv = dynamic_cast (rv); - - if (rv && arv && arv->envelope_visible()) { - have_envelope_visible = true; - } else { - have_envelope_invisible = true; + have_envelope_invisible = true; + + if (rv) { + AudioRegionView* arv = dynamic_cast (rv); + if (arv && arv->envelope_visible()) { + have_envelope_visible = true; + } } if (ar->envelope_active()) {