Symbol editor: fix a compiler warning in the library manager code.

Fixes kicad/code/kicad#3651
This commit is contained in:
Wayne Stambaugh 2019-12-12 14:36:29 -05:00
parent bcaa15e54c
commit c4d1cebbdd
1 changed files with 3 additions and 2 deletions

View File

@ -876,8 +876,9 @@ bool LIB_MANAGER::LIB_BUFFER::DeleteBuffer( LIB_MANAGER::PART_BUFFER::PTR aPartB
bool retv = true;
// Remove all derived symbols to prevent broken inheritance.
if( aPartBuf->GetPart()->IsRoot() )
retv &= removeChildSymbols( aPartBuf );
if( aPartBuf->GetPart()->IsRoot() && HasDerivedSymbols( aPartBuf->GetPart()->GetName() )
&& removeChildSymbols( aPartBuf ) == 0 )
retv = false;
m_deleted.emplace_back( *partBufIt );
m_parts.erase( partBufIt );