Implement SCH_MARKER::GetSeverity().

Fixes https://gitlab.com/kicad/code/kicad/issues/10893
This commit is contained in:
Jeff Young 2022-02-18 10:37:41 +00:00
parent 5efa354f0f
commit a678b78091
2 changed files with 13 additions and 0 deletions

View File

@ -156,6 +156,17 @@ KIGFX::COLOR4D SCH_MARKER::getColor() const
}
SEVERITY SCH_MARKER::GetSeverity() const
{
if( IsExcluded() )
return RPT_SEVERITY_EXCLUSION;
ERC_ITEM* item = static_cast<ERC_ITEM*>( m_rcItem.get() );
return Schematic()->ErcSettings().GetSeverity( item->GetErrorCode() );
}
void SCH_MARKER::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset )
{
PrintMarker( aSettings, aOffset );

View File

@ -60,6 +60,8 @@ public:
SCH_LAYER_ID GetColorLayer() const;
SEVERITY GetSeverity() const override;
void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override;
void Plot( PLOTTER* /* aPlotter */, bool /* aBackground */ ) const override