Fix a minor issue on Windows: when a viewer or a lib editor is already open and iconized, and when one try to run it, it stayed inconized. It is now raised, like on Linux.

This commit is contained in:
jean-pierre charras 2015-07-16 21:29:40 +02:00
parent 27eafcb5c1
commit 3372b77b43
4 changed files with 24 additions and 7 deletions

View File

@ -51,6 +51,10 @@ void SCH_BASE_FRAME::OnOpenLibraryViewer( wxCommandEvent& event )
{
LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, true );
// On Windows, Raise() does not bring the window on screen, when iconized
if( viewlibFrame->IsIconized() )
viewlibFrame->Iconize( false );
viewlibFrame->Show( true );
viewlibFrame->Raise();
}

View File

@ -1005,9 +1005,14 @@ void SCH_EDIT_FRAME::OnOpenPcbModuleEditor( wxCommandEvent& event )
if( fn.IsOk() )
{
KIWAY_PLAYER* player = Kiway().Player( FRAME_PCB_MODULE_EDITOR );
player->Show( true );
player->Raise();
KIWAY_PLAYER* fp_editor = Kiway().Player( FRAME_PCB_MODULE_EDITOR );
// On Windows, Raise() does not bring the window on screen, when iconized
if( fp_editor->IsIconized() )
fp_editor->Iconize( false );
fp_editor->Show( true );
fp_editor->Raise();
}
}
}
@ -1109,6 +1114,10 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event )
libeditFrame->Show( true );
}
// On Windows, Raise() does not bring the window on screen, when iconized
if( libeditFrame->IsIconized() )
libeditFrame->Iconize( false );
libeditFrame->Raise();
if( component )

View File

@ -206,10 +206,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
else
{
/* not needed on linux, other platforms need this?
// Needed on Windows, other platforms do not use it,
// but it creates no issue
if( editor->IsIconized() )
editor->Iconize( false );
*/
editor->Raise();
@ -232,10 +232,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
else
{
/* not needed on linux, other platforms need this?
// Needed on Windows, other platforms do not use it,
// but it creates no issue
if( viewer->IsIconized() )
viewer->Iconize( false );
*/
viewer->Raise();

View File

@ -284,6 +284,10 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
else
{
// On Windows, Raise() does not bring the window on screen, when iconized
if( viewer->IsIconized() )
viewer->Iconize( false );
viewer->Raise();
// Raising the window does not set the focus on Linux. This should work on