LIB_ITEMs won't have parent in LibEdit.
This commit is contained in:
parent
a8c7bb0c92
commit
4fc1f4db3e
|
@ -276,7 +276,7 @@ bool SCH_PAINTER::setColors( const LIB_ITEM* aItem, int aLayer )
|
|||
{
|
||||
COLOR4D color = m_schSettings.GetLayerColor( LAYER_DEVICE_BACKGROUND );
|
||||
|
||||
if( aItem->IsMoving() || aItem->GetParent()->IsMoving() )
|
||||
if( aItem->IsMoving() || ( aItem->GetParent() && aItem->GetParent()->IsMoving() ) )
|
||||
color = selectedBrightening( color );
|
||||
|
||||
m_gal->SetIsFill( true );
|
||||
|
@ -289,7 +289,7 @@ bool SCH_PAINTER::setColors( const LIB_ITEM* aItem, int aLayer )
|
|||
{
|
||||
COLOR4D color = m_schSettings.GetLayerColor( LAYER_DEVICE );
|
||||
|
||||
if( aItem->IsMoving() || aItem->GetParent()->IsMoving() )
|
||||
if( aItem->IsMoving() || ( aItem->GetParent() && aItem->GetParent()->IsMoving() ) )
|
||||
color = selectedBrightening( color );
|
||||
|
||||
m_gal->SetIsStroke( true );
|
||||
|
@ -378,7 +378,7 @@ void SCH_PAINTER::draw( LIB_FIELD *aField, int aLayer )
|
|||
|
||||
COLOR4D color = aField->GetDefaultColor();
|
||||
|
||||
if( aField->IsMoving() || aField->GetParent()->IsMoving() )
|
||||
if( aField->IsMoving() || ( aField->GetParent() && aField->GetParent()->IsMoving() ) )
|
||||
color = selectedBrightening( color );
|
||||
|
||||
if( !aField->IsVisible() )
|
||||
|
@ -427,7 +427,7 @@ void SCH_PAINTER::draw( LIB_TEXT *aText, int aLayer )
|
|||
|
||||
COLOR4D color = m_schSettings.GetLayerColor( LAYER_DEVICE );
|
||||
|
||||
if( aText->IsMoving() || aText->GetParent()->IsMoving() )
|
||||
if( aText->IsMoving() || ( aText->GetParent() && aText->GetParent()->IsMoving() ) )
|
||||
color = selectedBrightening( color );
|
||||
|
||||
if( !aText->IsVisible() )
|
||||
|
|
Loading…
Reference in New Issue