Clear symbol library list from project file after remapping.
The old symbol library list save/load code does not get called in the schematic project file configuration code. Use the LibNamesAndPaths static function from the PART_LIBS object. Bump schematic file version from 3 to 4 which represents the switch to the library table symbol linking which is incompatible with all previous versions. Refresh the schematic after running remapping dialog manually.
This commit is contained in:
parent
44d81e4005
commit
a2e7e7aed4
|
@ -65,15 +65,14 @@ void DIALOG_SYMBOL_REMAP::OnRemapSymbols( wxCommandEvent& aEvent )
|
|||
remapSymbolsToLibTable( m_messagePanel->Reporter() );
|
||||
|
||||
// Remove all of the libraries from the legacy library list.
|
||||
PART_LIBS* libs = Prj().SchLibs();
|
||||
libs->clear();
|
||||
wxString paths;
|
||||
wxArrayString libNames;
|
||||
|
||||
PART_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
|
||||
|
||||
// Reload the the cache symbol library.
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL );
|
||||
Prj().SchLibs();
|
||||
|
||||
// Update the project file so the library list is cleared.
|
||||
SCH_EDIT_FRAME* parent = static_cast< SCH_EDIT_FRAME* >( GetParent() );
|
||||
wxCHECK_RET( parent, "Parent window was not and SCH_EDIT_FRAME" );
|
||||
parent->SaveProjectSettings( false );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ using KIGFX::COLOR4D;
|
|||
class TRANSFORM;
|
||||
class SCH_SHEET;
|
||||
|
||||
#define EESCHEMA_VERSION 3
|
||||
#define EESCHEMA_VERSION 4
|
||||
#define SCHEMATIC_HEAD_STRING "Schematic File Version"
|
||||
|
||||
#define DANGLING_SYMBOL_SIZE 12
|
||||
|
|
|
@ -1274,6 +1274,8 @@ void SCH_EDIT_FRAME::OnRemapSymbols( wxCommandEvent& event )
|
|||
DIALOG_SYMBOL_REMAP dlgRemap( this );
|
||||
|
||||
dlgRemap.ShowQuasiModal();
|
||||
|
||||
m_canvas->Refresh( true );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue