Commit 8a1c8a91 authored by jean-pierre charras's avatar jean-pierre charras

More fixes on Ubuntu/Unity for dialogs which are not displayed.

parent ca2b9cee
...@@ -165,6 +165,8 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent ...@@ -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 // Problems with modal on wx-2.9 - Anyway preview is standard for OSX
m_buttonPreview->Hide(); m_buttonPreview->Hide();
#endif #endif
GetSizer()->Fit( this );
} }
...@@ -197,10 +199,7 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) ...@@ -197,10 +199,7 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
pageSetupDialogData.GetPrintData().SetOrientation( pageInfo.GetWxOrientation() ); pageSetupDialogData.GetPrintData().SetOrientation( pageInfo.GetWxOrientation() );
if ( GetSizer() ) if ( GetSizer() )
{
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
GetSizer()->Fit( this );
}
// Rely on the policy in class DIALOG_SHIM, which centers the dialog // 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 // 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 ) ...@@ -277,6 +276,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
preview->SetZoom( 100 ); preview->SetZoom( 100 );
SCH_PREVIEW_FRAME* frame = new SCH_PREVIEW_FRAME( preview, this, title ); 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, // 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. // 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 ) ...@@ -284,6 +284,8 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
frame->Center(); frame->Center();
frame->Initialize(); frame->Initialize();
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
frame->Show( true ); frame->Show( true );
} }
......
...@@ -90,6 +90,8 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, ...@@ -90,6 +90,8 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData,
} }
SetSize( size ); SetSize( size );
GetSizer()->Fit( this ); // Needed on Ubuntu/Unity to display the dialog
} }
......
...@@ -133,6 +133,8 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( GERBVIEW_FRAME* parent ) ...@@ -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 */ /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
m_buttonPreview->Hide(); m_buttonPreview->Hide();
#endif #endif
GetSizer()->Fit( this );
} }
...@@ -368,8 +370,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -368,8 +370,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
wxSize WSize = m_Parent->GetSize(); wxSize WSize = m_Parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->SetMinSize( wxSize( 550, 350 ) );
frame->Initialize(); frame->Initialize();
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
frame->Show( true ); frame->Show( true );
} }
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/* File: dialog_print_for_modedit.cpp */ /* File: dialog_print_for_modedit.cpp */
#include <fctsys.h> #include <fctsys.h>
//#include <pgm_base.h>
#include <kiface_i.h> #include <kiface_i.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <confirm.h> #include <confirm.h>
...@@ -116,6 +115,7 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent ) : ...@@ -116,6 +115,7 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent ) :
m_buttonPrint->SetDefault(); m_buttonPrint->SetDefault();
GetSizer()->SetSizeHints( this ); 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 ) ...@@ -188,8 +188,11 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
wxSize WSize = m_parent->GetSize(); wxSize WSize = m_parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->SetMinSize( wxSize( 550, 350 ) );
frame->Initialize(); frame->Initialize();
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
frame->Show( true ); frame->Show( true );
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
//#define wxTEST_POSTSCRIPT_IN_MSW 1 //#define wxTEST_POSTSCRIPT_IN_MSW 1
#include <fctsys.h> #include <fctsys.h>
//#include <pgm_base.h>
#include <kiface_i.h> #include <kiface_i.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <confirm.h> #include <confirm.h>
...@@ -146,22 +145,18 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) ...@@ -146,22 +145,18 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent )
{ {
m_parent = parent; m_parent = parent;
m_config = Kiface().KifaceSettings(); m_config = Kiface().KifaceSettings();
memset( m_BoxSelectLayer, 0, sizeof( m_BoxSelectLayer ) ); memset( m_BoxSelectLayer, 0, sizeof( m_BoxSelectLayer ) );
initValues( ); initValues( );
if( GetSizer() ) GetSizer()->SetSizeHints( this );
{
GetSizer()->SetSizeHints( this );
}
Center(); Center();
#ifdef __WXMAC__ #ifdef __WXMAC__
/* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */ /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
m_buttonPreview->Hide(); m_buttonPreview->Hide();
#endif #endif
GetSizer()->Fit( this );
} }
...@@ -469,8 +464,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -469,8 +464,11 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
preview->SetZoom( 100 ); preview->SetZoom( 100 );
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->SetMinSize( wxSize( 550, 350 ) );
frame->Initialize(); frame->Initialize();
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
frame->Show( true ); frame->Show( true );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment