_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 ()
}
}
- 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) {