X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fcontent_widget.h;h=c4ae4d591aaa5d97a472953d4e06626e0236019e;hp=e162aca4950718ac7fd709a21d59d2bca114b52b;hb=386e25f3b9d3fa59cbdeed458d9b3e0d21e338b8;hpb=67a68bd971ebe1b35daa3f75873b4ccb53c00ba0 diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h index e162aca49..c4ae4d591 100644 --- a/src/wx/content_widget.h +++ b/src/wx/content_widget.h @@ -105,7 +105,7 @@ public: update_from_model (); for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) { - _connections.push_back ((*i)->Changed.connect (boost::bind (&ContentWidget::model_changed, this, _2))); + _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3))); } } @@ -149,11 +149,16 @@ public: _ignore_model_changes = false; } + void show (bool s) + { + _wrapped->Show (s); + } + private: void set_single () { - if (_wrapped->IsShown ()) { + if (_wrapped->IsShown() || !_sizer) { return; } @@ -166,7 +171,7 @@ private: void set_multiple () { - if (_button->IsShown ()) { + if (_button->IsShown() || !_sizer) { return; } @@ -185,9 +190,9 @@ private: } } - void model_changed (int property) + void model_changed (ChangeType type, int property) { - if (property == _property && !_ignore_model_changes) { + if (type == CHANGE_TYPE_DONE && property == _property && !_ignore_model_changes) { update_from_model (); } }