From 2ee222e3bceb82b8932291cc175c7e6cd50d37f7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 15 Jul 2015 14:41:30 +0200 Subject: [PATCH] Fix issues on Linux/Unity (dialogs not always raised) --- eeschema/libeditframe.cpp | 1 + eeschema/viewlib_frame.cpp | 3 +++ pcbnew/edit.cpp | 8 -------- pcbnew/moduleframe.cpp | 3 +++ pcbnew/modview_frame.cpp | 6 ------ 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index c7ab53290a..d368dbc02b 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -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 ); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 80068484c7..c7973d8887 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -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 ); + } } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index c4cf58a12a..0ae67ca232 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -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; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 38f2b73b9f..06aeaf6d8e 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -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 ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index c7b0f3e307..5b80077612 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -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();