mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
If library was updated outside KiCad, the symbol may have been deleted. (KICAD-QZ9)
This commit is contained in:
parent
7fc9fc5f58
commit
7bab41d746
@ -1622,8 +1622,7 @@ void SYMBOL_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
SYMBOL_LIB_TABLE* tbl = PROJECT_SCH::SchSymbolLibTable( &Prj() );
|
||||
LIB_SYMBOL* symbol = GetCurSymbol();
|
||||
|
||||
wxLogTrace( "KICAD_LIB_WATCH", "Received refresh symbol request for %s",
|
||||
payload );
|
||||
wxLogTrace( "KICAD_LIB_WATCH", "Received refresh symbol request for %s", payload );
|
||||
|
||||
if( !tbl || !symbol )
|
||||
break;
|
||||
@ -1637,8 +1636,7 @@ void SYMBOL_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
wxFileName libfullname( row->GetFullURI( true ) );
|
||||
|
||||
wxFileName changedLib( mail.GetPayload() );
|
||||
wxLogTrace( "KICAD_LIB_WATCH",
|
||||
"Received refresh symbol request for %s, current symbols is %s",
|
||||
wxLogTrace( "KICAD_LIB_WATCH", "Received refresh symbol request for %s, current symbols is %s",
|
||||
changedLib.GetFullPath(), libfullname.GetFullPath() );
|
||||
|
||||
if( changedLib == libfullname )
|
||||
@ -1648,20 +1646,19 @@ void SYMBOL_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
SetScreen( m_dummyScreen ); // UpdateLibraryBuffer will destroy the old screen
|
||||
m_libMgr->UpdateLibraryBuffer( libName );
|
||||
|
||||
LIB_SYMBOL* lib_symbol = m_libMgr->GetBufferedSymbol( symbol->GetName(), libName );
|
||||
wxCHECK2_MSG( lib_symbol, break, wxString::Format( "Symbol %s not found in library %s",
|
||||
symbol->GetName(), libName ) );
|
||||
if( LIB_SYMBOL* lib_symbol = m_libMgr->GetBufferedSymbol( symbol->GetName(), libName ) )
|
||||
{
|
||||
// The buffered screen for the symbol
|
||||
SCH_SCREEN* symbol_screen = m_libMgr->GetScreen( lib_symbol->GetName(), libName );
|
||||
|
||||
// The buffered screen for the symbol
|
||||
SCH_SCREEN* symbol_screen = m_libMgr->GetScreen( lib_symbol->GetName(), libName );
|
||||
SetScreen( symbol_screen );
|
||||
SetCurSymbol( new LIB_SYMBOL( *lib_symbol ), false );
|
||||
RebuildSymbolUnitsList();
|
||||
SetShowDeMorgan( GetCurSymbol()->HasAlternateBodyStyle() );
|
||||
|
||||
SetScreen( symbol_screen );
|
||||
SetCurSymbol( new LIB_SYMBOL( *lib_symbol ), false );
|
||||
RebuildSymbolUnitsList();
|
||||
SetShowDeMorgan( GetCurSymbol()->HasAlternateBodyStyle() );
|
||||
|
||||
if( m_toolManager )
|
||||
m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
|
||||
if( m_toolManager )
|
||||
m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user