Don't assume we have a MODULE parent
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6063
This commit is contained in:
parent
f8d38fc6c0
commit
0d5b5bf8c3
|
@ -1233,6 +1233,12 @@ const BOX2I D_PAD::ViewBBox() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MODULE* D_PAD::GetParent() const
|
||||||
|
{
|
||||||
|
return dynamic_cast<MODULE*>( m_Parent );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void D_PAD::ImportSettingsFrom( const D_PAD& aMasterPad )
|
void D_PAD::ImportSettingsFrom( const D_PAD& aMasterPad )
|
||||||
{
|
{
|
||||||
SetShape( aMasterPad.GetShape() );
|
SetShape( aMasterPad.GetShape() );
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE* GetParent() const { return (MODULE*) m_Parent; }
|
MODULE* GetParent() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Imports the pad settings from aMasterPad.
|
* Imports the pad settings from aMasterPad.
|
||||||
|
|
Loading…
Reference in New Issue