Eeschema: ensure component edit flags are cleared after loading a schematic file.

Fixes #4515
https://gitlab.com/kicad/code/kicad/issues/4515
This commit is contained in:
jean-pierre charras 2020-05-22 20:25:43 +02:00
parent 9a08ee2778
commit 14f5ef4078
2 changed files with 8 additions and 0 deletions

View File

@ -1182,6 +1182,11 @@ void SCH_COMPONENT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aL
aList.push_back( MSG_PANEL_ITEM( msg, GetField( VALUE )->GetShownText(), DARKCYAN ) );
#if 0 // Display component flags, for debug only
aList.push_back( MSG_PANEL_ITEM( _( "flags" ),
wxString::Format("%X", GetEditFlags()), BROWN ) );
#endif
// Display component reference in library and library
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), GetLibId().GetLibItemName(), BROWN ) );

View File

@ -2193,6 +2193,9 @@ SCH_COMPONENT* SCH_SEXPR_PARSER::parseSchematicSymbol()
if( !libName.IsEmpty() && ( symbol->GetLibId().Format().wx_str() != libName ) )
symbol->SetSchSymbolLibraryName( libName );
// Ensure edit/status flags are cleared after these initializations:
symbol->ClearFlags();
return symbol.release();
}