From ca2b9cee573eb2f0784ccf10f69874261c6896ef Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 19 Nov 2014 16:54:36 +0100 Subject: [PATCH] Try to fix issues on Ubuntu/Unity for dialogs which are not displayed: adding GetSizer()->Fit( this ) in some other dialogs --- eeschema/dialogs/dialog_print_using_printer.cpp | 3 +++ eeschema/sheet.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index 0b3fec6c38..a8e63e5394 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -197,7 +197,10 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) pageSetupDialogData.GetPrintData().SetOrientation( pageInfo.GetWxOrientation() ); if ( GetSizer() ) + { GetSizer()->SetSizeHints( this ); + GetSizer()->Fit( this ); + } // Rely on the policy in class DIALOG_SHIM, which centers the dialog // initially during a runtime session but gives user the ability to move it in diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index d902fe0111..d0e143d2b1 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -62,10 +62,12 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) * column from being sized correctly. It doesn't cause any problems * on win32 so it doesn't need to wrapped in ugly #ifdef __WXGTK__ * #endif. + * Still presen in wxWidgets 3.0.2 */ dlg.Layout(); dlg.Fit(); dlg.SetMinSize( dlg.GetSize() ); + dlg.GetSizer()->Fit( &dlg ); if( dlg.ShowModal() == wxID_CANCEL ) return false;