From 8d236b88ae27e60d66df397e64607026c5de25e1 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sun, 9 Aug 2015 23:28:13 -0500 Subject: [PATCH] Fix bug #1110 --- lib-src/FileDialog/win/FileDialogPrivate.cpp | 16 ++++++++++++---- src/export/Export.cpp | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib-src/FileDialog/win/FileDialogPrivate.cpp b/lib-src/FileDialog/win/FileDialogPrivate.cpp index e118f85fb..709a899bb 100644 --- a/lib-src/FileDialog/win/FileDialogPrivate.cpp +++ b/lib-src/FileDialog/win/FileDialogPrivate.cpp @@ -180,6 +180,14 @@ void FileDialog::MSWOnSize(HWND hDlg, LPOPENFILENAME pOfn) SetHWND(mChildDlg); + SetWindowPos(mChildDlg, + HWND_TOP, + 0, + 0, + r.GetWidth(), + r.GetHeight(), + SWP_NOZORDER | SWP_NOMOVE); + SetSize(r); if (mRoot) @@ -272,19 +280,19 @@ void FileDialog::MSWOnInitDialog(HWND hDlg, LPOPENFILENAME pOfn) if (HasUserPaneCreator()) { // Create the root window - wxBoxSizer *verticalSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer *verticalSizer = new wxBoxSizer(wxVERTICAL); mRoot = new wxPanel(this, wxID_ANY); wxPanel *userpane = new wxPanel(mRoot, wxID_ANY); CreateUserPane(userpane); wxBoxSizer *horizontalSizer = new wxBoxSizer(wxHORIZONTAL); - horizontalSizer->Add(userpane, 1, wxEXPAND, 0); - verticalSizer->Add(horizontalSizer, 1, wxEXPAND|wxALL, 0); + horizontalSizer->Add(userpane, 1, wxEXPAND); + verticalSizer->Add(horizontalSizer, 1, wxEXPAND); mRoot->SetSizer(verticalSizer); mRoot->Layout(); - verticalSizer->SetSizeHints(mRoot); + mRoot->Fit(); // This reserves space for the additional panel wxSize sz = mRoot->GetBestSize(); diff --git a/src/export/Export.cpp b/src/export/Export.cpp index 246337ef4..eb833c694 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -871,7 +871,7 @@ void Exporter::CreateUserPaneCallback(wxWindow *parent, wxUIntPtr userdata) void Exporter::CreateUserPane(wxWindow *parent) { - ShuttleGui S(parent, eIsCreatingFromPrefs); + ShuttleGui S(parent, eIsCreating); S.StartVerticalLay(); { @@ -894,7 +894,7 @@ void Exporter::CreateUserPane(wxWindow *parent) } S.EndHorizontalLay(); } - S.EndHorizontalLay(); + S.EndVerticalLay(); return; }