diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 9d2fe5b7b3..c4587fd2d7 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -329,7 +329,12 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName // On Windows, Raise() does not bring the window on screen, when iconized or not shown // On linux, Raise() brings the window on screen, but this code works fine if( frame->IsIconized() ) + { frame->Iconize( false ); + // If an iconized frame was created by Pcbnew, Iconize( false ) is not enough + // to show the frame at its normal size: Maximize should be called. + frame->Maximize( false ); + } frame->Raise(); } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 36c76a66f1..6c7b7e022f 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -1228,13 +1228,22 @@ void PCB_EDIT_FRAME::OnUpdatePCBFromSch( wxCommandEvent& event ) } else { + // Update PCB requires a netlist. Therefore the schematic editor must be running + // If this is not the case, open the schematic editor KIWAY_PLAYER* frame = Kiway().Player( FRAME_SCH, true ); - wxFileName schfn( Prj().GetProjectPath(), Prj().GetProjectName(), SchematicFileExtension ); - if( !frame->IsVisible() ) + if( !frame->IsShown() ) { + wxFileName schfn( Prj().GetProjectPath(), Prj().GetProjectName(), SchematicFileExtension ); + frame->OpenProjectFiles( std::vector( 1, schfn.GetFullPath() ) ); - frame->Show( false ); + // Because the schematic editor frame is not on screen, iconize it: + // However, an other valid option is to do not iconize the schematic editor frame + // and show it + frame->Iconize( true ); + // we show the schematic editor frame, because do not show is seen as + // a not yet opened schematic by Kicad manager, which is not the case + frame->Show( true ); } Kiway().ExpressMail( FRAME_SCH, MAIL_SCH_PCB_UPDATE_REQUEST, "", this );