Objects on UNDEFINED_LAYER should return an empty layerset.
Fixes https://gitlab.com/kicad/code/kicad/issues/10417
This commit is contained in:
parent
728ca8265f
commit
b3c324b352
|
@ -156,7 +156,14 @@ public:
|
|||
/**
|
||||
* Return a std::bitset of all layers on which the item physically resides.
|
||||
*/
|
||||
virtual LSET GetLayerSet() const { return LSET( m_layer ); }
|
||||
virtual LSET GetLayerSet() const
|
||||
{
|
||||
if( m_layer == UNDEFINED_LAYER )
|
||||
return LSET();
|
||||
else
|
||||
return LSET( m_layer );
|
||||
}
|
||||
|
||||
virtual void SetLayerSet( LSET aLayers )
|
||||
{
|
||||
wxFAIL_MSG( "Attempted to SetLayerSet() on a single-layer object." );
|
||||
|
|
Loading…
Reference in New Issue