diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index afc956da99..b409d4980a 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -618,6 +618,15 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent ) if( !AskToSaveChanges() ) return; + if( Schematic().RootScreen() && !Schematic().RootScreen()->Items().empty() ) + { + wxString msg = _( "This operation replaces the contents of the current project.\n\n" + "Do you want to proceed?" ); + + if( !IsOK( this, msg ) ) + return; + } + // Set the project location if none is set or if we are running in standalone mode bool setProject = Prj().GetProjectFullName().IsEmpty() || Kiface().IsSingle(); wxString path = wxPathOnly( Prj().GetProjectFullName() ); diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index a5ad9c2620..a61d1dfaec 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -106,11 +106,15 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool ); submenuImport->SetTitle( _( "Import" ) ); submenuImport->SetIcon( BITMAPS::import ); - submenuImport->Add( _( "Non-KiCad Schematic..." ), + + if( Kiface().IsSingle() ) + { + submenuImport->Add( _( "Non-KiCad Schematic..." ), _( "Replace current schematic sheet with one imported from another " "application" ), ID_IMPORT_NON_KICAD_SCH, BITMAPS::import_document ); + } submenuImport->Add( EE_ACTIONS::importFPAssignments, ACTION_MENU::NORMAL, _( "Footprint Assignments..." ) );