Add a couple of audio properties to the multi-select list.
[dcpomatic.git] / src / wx / content_widget.h
index 32fabda97548ff83e7c04ddce813ce75a14d8f61..eb264eae9dfaaf43695be7afd88d90d94c2870f6 100644 (file)
@@ -87,6 +87,28 @@ public:
                _sizer->Add (_wrapped, _position);
        }
 
+
+       void update_from_model ()
+       {
+               if (_content.empty ()) {
+                       set_single ();
+                       return;
+               }
+
+               typename List::iterator i = _content.begin ();
+               int const v = boost::bind (_getter, _content.front().get())();
+               while (i != _content.end() && boost::bind (_getter, i->get())() == v) {
+                       ++i;
+               }
+
+               if (i == _content.end ()) {
+                       set_single ();
+                       checked_set (_wrapped, v);
+               } else {
+                       set_multiple ();
+               }
+       }
+
 private:
        
        void set_single ()
@@ -132,27 +154,6 @@ private:
                }
        }
 
-       void update_from_model ()
-       {
-               if (_content.empty ()) {
-                       set_single ();
-                       return;
-               }
-
-               typename List::iterator i = _content.begin ();
-               int const v = boost::bind (_getter, _content.front().get())();
-               while (i != _content.end() && boost::bind (_getter, i->get())() == v) {
-                       ++i;
-               }
-
-               if (i == _content.end ()) {
-                       set_single ();
-                       checked_set (_wrapped, v);
-               } else {
-                       set_multiple ();
-               }
-       }
-
        void model_changed (int property)
        {
                if (property == _property && !_ignore_model_changes) {