make sure editor can follow visibility changes for VCAs
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 10 Jun 2016 19:00:43 +0000 (15:00 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 10 Jun 2016 19:00:43 +0000 (15:00 -0400)
gtk2_ardour/editor_routes.cc
gtk2_ardour/vca_time_axis.cc
gtk2_ardour/vca_time_axis.h

index bc16c14d6009660e1276bd9866b7278151ac15f8..9c827c141266682366e7be2b62be38034ef09f7a 100644 (file)
@@ -581,7 +581,6 @@ EditorRoutes::redisplay_real ()
 
        for (n = 0, position = 0, i = rows.begin(); i != rows.end(); ++i) {
                TimeAxisView *tv = (*i)[_columns.tv];
-               boost::shared_ptr<Stripable> route = (*i)[_columns.stripable];
 
                if (tv == 0) {
                        // just a "title" row
@@ -926,7 +925,9 @@ EditorRoutes::route_property_changed (const PropertyChange& what_changed, boost:
 
                        if (what_changed.contains (ARDOUR::Properties::hidden)) {
                                (*i)[_columns.visible] = !stripable->presentation_info().hidden();
+                               cerr << stripable->name() << " visibility changed, redisplay\n";
                                redisplay ();
+
                        }
 
                        break;
index 3bbb4a5f4c0244ba6c7138ea4a933ba225b1f07c..0c77fd66f844fbdd103a980fb1d8930a61a8a750 100644 (file)
@@ -304,3 +304,19 @@ VCATimeAxisView::set_height (uint32_t h, TrackHeightMode m)
        set_gui_property ("height", h);
        _vca->gui_changed ("track_height", (void*) 0); /* EMIT SIGNAL */
 }
+
+bool
+VCATimeAxisView::marked_for_display () const
+{
+       return !_vca->presentation_info().hidden();
+}
+
+bool
+VCATimeAxisView::set_marked_for_display (bool yn)
+{
+       if (yn == _vca->presentation_info().hidden()) {
+               _vca->presentation_info().set_hidden (!yn);
+               return true; // things changed
+       }
+       return false;
+}
index 2ee23bca4413bf0a72019fe3cea39ebbd183db3e..c40b1ab28889412e2220e40b37c7101badd620ca 100644 (file)
@@ -52,6 +52,8 @@ class VCATimeAxisView : public TimeAxisView
        void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
 
        bool selectable() const { return false; }
+       bool marked_for_display () const;
+       bool set_marked_for_display (bool);
 
  protected:
        boost::shared_ptr<ARDOUR::VCA> _vca;