Don't blindly overwrite footprints when doing a Save As.

This commit is contained in:
Jeff Young
2018-10-24 22:00:50 +01:00
parent 244497f514
commit 9624ef4f2e
+12
View File
@@ -948,6 +948,18 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintAs( MODULE* aModule )
bool module_exists = tbl->FootprintExists( libraryName, footprintName );
if( module_exists )
{
wxString msg = wxString::Format( _( "Footprint %s already exists in %s." ),
footprintName,
libraryName );
KIDIALOG dlg( this, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
dlg.SetOKLabel( _( "Overwrite" ) );
if( dlg.ShowModal() == wxID_CANCEL )
return false;
}
if( !saveFootprintInLibrary( aModule, libraryName ) )
return false;