7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 09:51:53 +00:00

DEFAULT no longer a legal LINE_STYLE for graphic lines.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19766
This commit is contained in:
Jeff Young 2025-01-27 18:24:55 +00:00
parent 32673a0ead
commit e21ec0558e
2 changed files with 10 additions and 1 deletions

View File

@ -284,6 +284,15 @@ void SCH_LINE::SetLineStyle( const LINE_STYLE aStyle )
}
LINE_STYLE SCH_LINE::GetLineStyle() const
{
if( IsGraphicLine() && m_stroke.GetLineStyle() == LINE_STYLE::DEFAULT )
return LINE_STYLE::SOLID;
else
return m_stroke.GetLineStyle();
}
LINE_STYLE SCH_LINE::GetEffectiveLineStyle() const
{
if( m_stroke.GetLineStyle() != LINE_STYLE::DEFAULT )

View File

@ -163,7 +163,7 @@ public:
}
void SetLineStyle( const LINE_STYLE aStyle );
LINE_STYLE GetLineStyle() const { return m_stroke.GetLineStyle(); }
LINE_STYLE GetLineStyle() const;
/// @return the style that the line should be drawn in
/// this might be set on the line or inherited from the line's netclass
LINE_STYLE GetEffectiveLineStyle() const;