diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index 861a6106d7..d6732dd371 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -550,7 +550,7 @@ public: const wxString& aFullFileName, unsigned aNetlistOptions, REPORTER* aReporter = NULL, - bool silent = false ) override; + bool silent = false ); /** * Create a netlist file. diff --git a/include/kiway_player.h b/include/kiway_player.h index 613a41ab8e..3bf0e97b82 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -192,36 +192,6 @@ public: return false; } - /** - * Function ReadPcbNetlist - * provides access to PcbNew's function ReadPcbNetlist. - */ - VTBL_ENTRY void ReadPcbNetlist( const wxString& aNetlistFileName, - const wxString& aCmpFileName, - REPORTER* aReporter, - bool aChangeFootprint, - bool aDeleteBadTracks, - bool aDeleteExtraFootprints, - bool aSelectByTimestamp, - bool aDeleteSinglePadNets, - bool aIsDryRun ) - { - }; - - /** - * Function ReadPcbNetlist - * provides access to Eeschema's function CreateNetlist. - */ - VTBL_ENTRY bool CreateNetlist( int aFormat, - const wxString& aFullFileName, - unsigned aNetlistOptions, - REPORTER* aReporter = NULL, - bool silent = false ) - { - return false; - }; - - /** * Function ShowModal * puts up this wxFrame as if it were a modal dialog, with all other instantiated diff --git a/kicad/import_project.cpp b/kicad/import_project.cpp index 10b2084985..3727005a53 100644 --- a/kicad/import_project.cpp +++ b/kicad/import_project.cpp @@ -115,8 +115,6 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) } } - - wxFileName pcb( sch ); wxFileName netlist( pro ); pro.SetExt( ProjectFileExtension ); // enforce extension @@ -127,9 +125,7 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) pro.MakeAbsolute(); SetProjectFileName( pro.GetFullPath() ); - wxString prj_filename = GetProjectFileName(); - wxString sch_filename = sch.GetFullPath(); if( sch.FileExists() ) @@ -162,10 +158,9 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) schframe->Iconize( false ); schframe->Raise(); - - schframe->CreateNetlist( NET_TYPE_PCBNEW, netlist.GetFullPath(), 0, NULL, true ); } + if( pcb.FileExists() ) { PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway.Player( FRAME_PCB, false ); @@ -189,7 +184,7 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) // if the frame is not visible, the board is not yet loaded if( !pcbframe->IsVisible() ) { - pcbframe->ImportFile( pcb.GetFullPath(), IO_MGR::EAGLE ); + pcbframe->ImportFile( pcb.GetFullPath(), IO_MGR::EAGLE ); pcbframe->Show( true ); } @@ -199,18 +194,11 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) pcbframe->Raise(); - if( netlist.FileExists() ) - { - pcbframe->ReadPcbNetlist( netlist.GetFullPath(), - wxEmptyString, - NULL, - false, - false, - false, - false, - false, - false ); - } + // Two stage project update: + // - first, assign valid timestamps to footprints + // - second, perform schematic annotation and update footprint references + pcbframe->Kiway().ExpressMail( FRAME_SCH, MAIL_SCH_PCB_UPDATE_REQUEST, "no-annotate;by-reference", this ); + pcbframe->Kiway().ExpressMail( FRAME_SCH, MAIL_SCH_PCB_UPDATE_REQUEST, "quiet-annotate;by-timestamp", this ); } ReCreateTreePrj(); diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index 8b53d9570e..1fef5e26a8 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -1550,7 +1550,7 @@ public: bool aDeleteExtraFootprints, bool aSelectByTimestamp, bool aDeleteSinglePadNets, - bool aIsDryRun ) override; + bool aIsDryRun ); /** * Function RemoveMisConnectedTracks