From: Vadim Zeitlin Date: Tue, 21 May 2013 23:17:29 +0000 (+0000) Subject: Fit modeless preferences dialog to its contents too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/48e05747043db02c4e9d2e286eca4fdf5dee7881?ds=sidebyside;hp=eb1a78f7fff8bf0c084beb0e45ce005cc3695b69 Fit modeless preferences dialog to its contents too. When a preferences dialog is shown non-modally, it should still fit to the contents of its pages, so move the code added for the modal case in r73624 to the base wxGenericPreferencesEditorImplBase class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/preferencesg.cpp b/src/generic/preferencesg.cpp index 231185beed..65eeaa4b9d 100644 --- a/src/generic/preferencesg.cpp +++ b/src/generic/preferencesg.cpp @@ -125,6 +125,8 @@ protected: dlg->AddPage(i->get()); } + dlg->Fit(); + return dlg; } @@ -207,8 +209,6 @@ public: m_dlg = dlg.get(); wxON_BLOCK_EXIT_NULL(m_dlg); - dlg->Fit(); - // Restore the previously selected page, if any. if ( m_currentPage != -1 ) dlg->SelectPage(m_currentPage);