Fix disappearing video panel on OS X.
[dcpomatic.git] / src / wx / content_sub_panel.cc
index dc6c1d2b8666ba94b1f6da86f0824f5e2a65ba2c..aab404b74817861a08788845d18c51e9a2babc41 100644 (file)
@@ -35,9 +35,9 @@ ContentSubPanel::ContentSubPanel (ContentPanel* p, wxString name)
        : wxScrolledWindow (p->notebook(), wxID_ANY)
        , _parent (p)
        , _sizer (new wxBoxSizer (wxVERTICAL))
+       , _name (name)
 {
-       p->notebook()->AddPage (this, name, false);
-       SetScrollRate (-1, 8);
+       SetScrollRate (8, 8);
        SetSizer (_sizer);
 }
 
@@ -48,7 +48,11 @@ ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, sha
 
        wxString s;
        if (dcp && !can_reference) {
-               s = _("Cannot reference this DCP.  ") + std_to_wx(why_not);
+               if (why_not.empty()) {
+                       s = _("Cannot reference this DCP.");
+               } else {
+                       s = _("Cannot reference this DCP: ") + std_to_wx(why_not);
+               }
        }
 
        note->SetLabel (s);