Re-enable import non-Kicad project, but make it clear current will be lost.

(And there's no sense in asking if they want to save changes first,
as those will be lost too.)
This commit is contained in:
Jeff Young 2023-10-24 23:17:40 +01:00
parent fca1ad5285
commit 46aecefb04
2 changed files with 6 additions and 12 deletions

View File

@ -623,12 +623,10 @@ void SCH_EDIT_FRAME::OnAppendProject( wxCommandEvent& event )
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"
wxString msg = _( "This operation replaces the contents of the current schematic, "
"which will be permanently lost.\n\n"
"Do you want to proceed?" );
if( !IsOK( this, msg ) )

View File

@ -106,14 +106,10 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
submenuImport->SetTitle( _( "Import" ) );
submenuImport->SetIcon( BITMAPS::import );
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( _( "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..." ) );