Fix issues on Unbuntu Unity (dialogs/frames not raised when they are created and shown)

This commit is contained in:
jean-pierre charras 2015-07-15 15:03:19 +02:00
commit 5fb7c211f9
6 changed files with 11 additions and 18 deletions

View File

@ -111,10 +111,8 @@ bool DIALOG_SHIM::Show( bool show )
// If showing, use previous position and size.
if( show )
{
wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
ret = wxDialog::Show( show );
#ifdef __WXMAC__
wxDialog::Raise(); // More wxWindows brokenness on OS X
#endif
// classname is key, returns a zeroed out default EDA_RECT if none existed before.
EDA_RECT r = class_map[ hash_key ];

View File

@ -287,6 +287,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_auimgr.Update();
Raise();
Show( true );
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, ID_ZOOM_PAGE );

View File

@ -231,7 +231,10 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
#endif
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
{
Raise();
Show( true );
}
}

View File

@ -202,8 +202,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( !editor )
{
editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
editor->Show( true );
editor->Zoom_Automatique( false );
}
else
@ -230,8 +228,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( !viewer )
{
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true );
viewer->Show( true );
viewer->Zoom_Automatique( false );
}
else
@ -871,10 +867,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() );
SetCurItem( NULL ); // the current module could be deleted by
editor->Show( true );
editor->Raise(); // Iconize( false );
}
m_canvas->MoveCursorToCrossHair();
break;

View File

@ -333,6 +333,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_auimgr.Update();
Raise(); // On some window managers, this is needed
Show( true );
Zoom_Automatique( false );
}

View File

@ -260,12 +260,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
m_auimgr.GetPane( m_mainToolBar ).BestSize( tbsize );
}
#if 0 // no.
// Set min size (overwrite params read in LoadPerspective(), if any)
m_auimgr.GetPane( m_libList ).MinSize( minsize );
m_auimgr.GetPane( m_footprintList ).MinSize( minsize );
#endif
// after changing something to the aui manager,
// call Update()() to reflect the changes
m_auimgr.Update();
@ -280,8 +274,10 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
UseGalCanvas( parentFrame->IsGalCanvasActive() );
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
{
Raise(); // On some window managers, this is needed
Show( true );
}
}