diff --git a/src/dialog_properties.cpp b/src/dialog_properties.cpp index 7f795f0a6..bec1b784b 100644 --- a/src/dialog_properties.cpp +++ b/src/dialog_properties.cpp @@ -91,6 +91,14 @@ DialogProperties::DialogProperties(agi::Context *c) { d.SetIcon(GETICON(properties_toolbutton_16)); + // Button sizer + // Create buttons first. See: + // https://github.com/wangqr/Aegisub/issues/6 + // https://trac.wxwidgets.org/ticket/18472#comment:9 + auto ButtonSizer = d.CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP); + d.Bind(wxEVT_BUTTON, &DialogProperties::OnOK, this, wxID_OK); + d.Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP); + // Script details crap wxSizer *TopSizer = new wxStaticBoxSizer(wxHORIZONTAL,&d,_("Script")); auto TopSizerGrid = new wxFlexGridSizer(0,2,5,5); @@ -156,11 +164,6 @@ DialogProperties::DialogProperties(agi::Context *c) optionsGrid->AddGrowableCol(1,1); optionsBox->Add(optionsGrid,1,wxEXPAND,0); - // Button sizer - auto ButtonSizer = d.CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP); - d.Bind(wxEVT_BUTTON, &DialogProperties::OnOK, this, wxID_OK); - d.Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP); - // MainSizer wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL); MainSizer->Add(TopSizer,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);