Eeschema, remove option to import schematic that has not been remapped.
When importing an existing schematic into a sheet that was no remapped to use the symbol library table, the user was given the option to ignore the warning and proceed with the import. This would end up with all of the imported symbol links being broke. In hindsight, this was a bad idea so now the user cannot import schematics that have been remapped. Fixes lp:1791280 https://bugs.launchpad.net/kicad/+bug/1791280
This commit is contained in:
parent
ec38a5cd10
commit
b9a9fe6c9e
|
@ -441,7 +441,7 @@ bool SCH_EDIT_FRAME::AppendSchematic()
|
|||
if( !pi->GetError().IsEmpty() )
|
||||
{
|
||||
DisplayErrorMessage( this,
|
||||
_( "The entire schematic could not be load. Errors "
|
||||
_( "The entire schematic could not be loaded. Errors "
|
||||
"occurred attempting to load hierarchical sheet "
|
||||
"schematics." ),
|
||||
pi->GetError() );
|
||||
|
@ -484,10 +484,10 @@ bool SCH_EDIT_FRAME::AppendSchematic()
|
|||
|
||||
if( newScreens.HasNoFullyDefinedLibIds() )
|
||||
{
|
||||
if( !IsOK( this,
|
||||
"This schematic has not been remapped to the symbol library table. "
|
||||
"Therefore, all of the library symbol links will be broken. Do you "
|
||||
"want to continue?" ) )
|
||||
DisplayInfoMessage( this,
|
||||
"This schematic has not been remapped to the symbol library\n"
|
||||
"table. The project this schematic belongs to must first be\n"
|
||||
"remapped before it can be imported into the current project." );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -685,6 +685,7 @@ void SCH_EDIT_FRAME::OnSaveProject( wxCommandEvent& aEvent )
|
|||
SaveProject();
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EDIT_FRAME::SaveProject()
|
||||
{
|
||||
SCH_SCREEN* screen;
|
||||
|
@ -786,7 +787,6 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
|||
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_EAGLE ) );
|
||||
g_RootSheet = pi->Load( aFileName, &Kiway() );
|
||||
|
||||
|
||||
// Eagle sheets do not use a worksheet frame by default, so set it to an empty one
|
||||
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
|
||||
pglayout.SetEmptyLayout();
|
||||
|
@ -827,6 +827,7 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
|||
|
||||
SCH_TYPE_COLLECTOR components;
|
||||
SCH_SCREENS allScreens;
|
||||
|
||||
for( SCH_SCREEN* screen = allScreens.GetFirst(); screen; screen = allScreens.GetNext() )
|
||||
{
|
||||
components.Collect( screen->GetDrawItems(), SCH_COLLECTOR::ComponentsOnly );
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
#include <dialogs/dialog_sch_sheet_props.h>
|
||||
|
||||
|
||||
bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy, bool* aClearAnnotationNewItems )
|
||||
bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
|
||||
bool* aClearAnnotationNewItems )
|
||||
{
|
||||
if( aSheet == NULL || aHierarchy == NULL )
|
||||
return false;
|
||||
|
@ -285,11 +286,11 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy, b
|
|||
|
||||
if( newScreens.HasNoFullyDefinedLibIds() )
|
||||
{
|
||||
msg.Printf(_( "The schematic \"%s\" has not been remapped to the symbol library table. "
|
||||
"Most if not all of the symbol library links will be broken. Do you "
|
||||
"want to continue?" ), fileName.GetFullName() );
|
||||
msg.Printf(_( "The schematic \"%s\" has not been remapped to the symbol\nlibrary table. "
|
||||
" The project this schematic belongs to must first be remapped\nbefore it "
|
||||
"can be imported into the current project." ), fileName.GetFullName() );
|
||||
|
||||
if( !IsOK( this, msg ) )
|
||||
DisplayInfoMessage( this, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue