Update preferences when Ctrl-surfaces change with session.
authorRobin Gareus <robin@gareus.org>
Fri, 21 Apr 2017 00:56:29 +0000 (02:56 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 21 Apr 2017 02:08:00 +0000 (04:08 +0200)
gtk2_ardour/rc_option_editor.cc

index 84034ae6331dec5992c4482d91e87bbd60aebaa9..f4fbcc4f76cd4e5a167437408afbce683e0cd475 100644 (file)
@@ -1374,7 +1374,7 @@ class ControlSurfacesOptions : public OptionEditorMiniPage
                                if (!(*i)->mandatory) {
                                        TreeModel::Row r = *_store->append ();
                                        r[_model.name] = (*i)->name;
-                                       r[_model.enabled] = ((*i)->protocol || (*i)->requested);
+                                       r[_model.enabled] = 0 != (*i)->protocol;
                                        r[_model.protocol_info] = *i;
                                }
                        }
@@ -1391,8 +1391,9 @@ class ControlSurfacesOptions : public OptionEditorMiniPage
 
                                if ((*x)[_model.protocol_info] == cpi) {
                                        _ignore_view_change++;
-                                       (*x)[_model.enabled] = (cpi->protocol || cpi->requested);
+                                       (*x)[_model.enabled] = 0 != cpi->protocol;
                                        _ignore_view_change--;
+                                       selection_changed (); // update sensitivity
                                        break;
                                }
                        }