summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-06-03 21:14:46 +0200
committerCarl Hetherington <cth@carlh.net>2023-06-05 00:48:55 +0200
commit05b9552035be66d9cbf10e51e636845dcf49f30f (patch)
treec346758255d8699cac62db0bdf811b7ec988dd5f
parent742961d2c2cd446fcd96033403b35b0ae111401e (diff)
Fix sizing of editor's reel dialog.
-rw-r--r--src/tools/dcpomatic_editor.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc
index a61a17ce4..69fbe4643 100644
--- a/src/tools/dcpomatic_editor.cc
+++ b/src/tools/dcpomatic_editor.cc
@@ -147,10 +147,10 @@ public:
ReelEditor(wxWindow* parent)
: wxDialog(parent, wxID_ANY, _("Edit reel"))
{
- auto sizer = new wxBoxSizer(wxVERTICAL);
+ _sizer = new wxBoxSizer(wxVERTICAL);
_notebook = new wxNotebook(this, wxID_ANY);
- sizer->Add(_notebook, wxEXPAND | wxALL, 1, DCPOMATIC_DIALOG_BORDER);
- SetSizerAndFit(sizer);
+ _sizer->Add(_notebook, wxEXPAND | wxALL, 1, DCPOMATIC_DIALOG_BORDER);
+ SetSizerAndFit(_sizer);
}
optional<shared_ptr<dcp::Reel>> get() {
@@ -171,10 +171,14 @@ public:
if (_reel->main_subtitle()) {
_notebook->AddPage(new AssetPanel(_notebook, _reel->main_subtitle()), _("Subtitle"));
}
+
+ _sizer->Layout();
+ _sizer->SetSizeHints(this);
}
private:
wxNotebook* _notebook = nullptr;
+ wxSizer* _sizer = nullptr;
shared_ptr<dcp::Reel> _reel;
};