diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index a8e63e5394..390b875103 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -165,6 +165,8 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent // Problems with modal on wx-2.9 - Anyway preview is standard for OSX m_buttonPreview->Hide(); #endif + + GetSizer()->Fit( this ); } @@ -197,10 +199,7 @@ 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 @@ -277,6 +276,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) preview->SetZoom( 100 ); SCH_PREVIEW_FRAME* frame = new SCH_PREVIEW_FRAME( preview, this, title ); + frame->SetMinSize( wxSize( 550, 350 ) ); // on first invocation in this runtime session, set to 2/3 size of my parent, // but will be changed in Show() if not first time as will position. @@ -284,6 +284,8 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) frame->Center(); frame->Initialize(); + + frame->Raise(); // Needed on Ubuntu/Unity to display the frame frame->Show( true ); } diff --git a/eeschema/dialogs/dialog_schematic_find.cpp b/eeschema/dialogs/dialog_schematic_find.cpp index d5d23ec283..63800ef534 100644 --- a/eeschema/dialogs/dialog_schematic_find.cpp +++ b/eeschema/dialogs/dialog_schematic_find.cpp @@ -90,6 +90,8 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, } SetSize( size ); + + GetSizer()->Fit( this ); // Needed on Ubuntu/Unity to display the dialog } diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp index dd0bbf90a2..2baa22cc3a 100644 --- a/gerbview/dialogs/dialog_print_using_printer.cpp +++ b/gerbview/dialogs/dialog_print_using_printer.cpp @@ -133,6 +133,8 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( GERBVIEW_FRAME* parent ) /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */ m_buttonPreview->Hide(); #endif + + GetSizer()->Fit( this ); } @@ -368,8 +370,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) wxSize WSize = m_Parent->GetSize(); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); + frame->SetMinSize( wxSize( 550, 350 ) ); frame->Initialize(); + + frame->Raise(); // Needed on Ubuntu/Unity to display the frame frame->Show( true ); } diff --git a/pcbnew/dialogs/dialog_print_for_modedit.cpp b/pcbnew/dialogs/dialog_print_for_modedit.cpp index a0a19250a8..72504d547c 100644 --- a/pcbnew/dialogs/dialog_print_for_modedit.cpp +++ b/pcbnew/dialogs/dialog_print_for_modedit.cpp @@ -25,7 +25,6 @@ /* File: dialog_print_for_modedit.cpp */ #include -//#include #include #include #include @@ -116,6 +115,7 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent ) : m_buttonPrint->SetDefault(); GetSizer()->SetSizeHints( this ); + GetSizer()->Fit( this ); // Needed on Ubuntu/Unity to display the dialog } @@ -188,8 +188,11 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) wxSize WSize = m_parent->GetSize(); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); + frame->SetMinSize( wxSize( 550, 350 ) ); frame->Initialize(); + + frame->Raise(); // Needed on Ubuntu/Unity to display the frame frame->Show( true ); } diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp index 6334e1ca52..222c98ecfa 100644 --- a/pcbnew/dialogs/dialog_print_using_printer.cpp +++ b/pcbnew/dialogs/dialog_print_using_printer.cpp @@ -26,7 +26,6 @@ //#define wxTEST_POSTSCRIPT_IN_MSW 1 #include -//#include #include #include #include @@ -146,22 +145,18 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) { m_parent = parent; m_config = Kiface().KifaceSettings(); - memset( m_BoxSelectLayer, 0, sizeof( m_BoxSelectLayer ) ); initValues( ); - if( GetSizer() ) - { - GetSizer()->SetSizeHints( this ); - } - + GetSizer()->SetSizeHints( this ); Center(); #ifdef __WXMAC__ /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */ m_buttonPreview->Hide(); #endif + GetSizer()->Fit( this ); } @@ -469,8 +464,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) preview->SetZoom( 100 ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); + frame->SetMinSize( wxSize( 550, 350 ) ); frame->Initialize(); + + frame->Raise(); // Needed on Ubuntu/Unity to display the frame frame->Show( true ); }