X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_sub_panel.cc;h=6bbc9a51fcae43a89ad9e785ec99e2242fb266cb;hb=959e2b1a5c799427375fc8f7bb11389f699cfe21;hp=e0a1a52bddac98382118852cc029b0c9c005c769;hpb=a5d004b0773f633401528392fc28e66d70e13ac8;p=dcpomatic.git diff --git a/src/wx/content_sub_panel.cc b/src/wx/content_sub_panel.cc index e0a1a52bd..6bbc9a51f 100644 --- a/src/wx/content_sub_panel.cc +++ b/src/wx/content_sub_panel.cc @@ -18,21 +18,27 @@ */ + #include "content_sub_panel.h" #include "content_panel.h" #include "wx_util.h" #include "lib/dcp_content.h" #include "lib/compose.hpp" #include "lib/log.h" +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS + using std::list; -using std::string; using std::shared_ptr; +using std::string; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif + ContentSubPanel::ContentSubPanel (ContentPanel* p, wxString name) : wxScrolledWindow (p->notebook(), wxID_ANY) , _parent (p) @@ -47,7 +53,7 @@ ContentSubPanel::ContentSubPanel (ContentPanel* p, wxString name) } void -ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, shared_ptr dcp, bool can_reference, wxString cannot) const +ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, shared_ptr dcp, bool can_reference, wxString cannot) { button->Enable (can_reference); @@ -65,5 +71,19 @@ ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, sha note->Show (); } + layout (); +} + + +void +ContentSubPanel::layout () +{ + int x; + int y; + GetViewStart (&x, &y); + Scroll (0, 0); _sizer->Layout (); + _sizer->FitInside(this); + Scroll (x, y); } +