Editor::axis_view_by_control() needs to explore child tracks, now that Selection...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 5 May 2017 17:06:51 +0000 (18:06 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 5 May 2017 17:56:25 +0000 (18:56 +0100)
gtk2_ardour/editor.cc

index 7fe49de57b37ca864e7109eacf1f5f5612bcde98..b16bce984704ba2de44ce5b6abae3b5dbbcdbffa 100644 (file)
@@ -5254,6 +5254,14 @@ Editor::axis_view_by_control (boost::shared_ptr<AutomationControl> c) const
                if ((*j)->control() == c) {
                        return *j;
                }
+
+               TimeAxisView::Children kids = (*j)->get_child_list ();
+
+               for (TimeAxisView::Children::iterator k = kids.begin(); k != kids.end(); ++k) {
+                       if ((*k)->control() == c) {
+                               return (*k).get();
+                       }
+               }
        }
 
        return 0;