Fix bad static cast.

Hypertext fields aren't always intersheet refs anymore.
This commit is contained in:
Jeff Young 2025-04-30 12:27:37 +01:00
parent 4a41f4a525
commit b772960717

View File

@ -1283,9 +1283,9 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS&
aPlotter->PlotText( textpos, color, text, attrs, font, GetFontMetrics() );
if( IsHypertext() && Schematic() )
if( m_id == FIELD_T::INTERSHEET_REFS && Schematic() )
{
SCH_LABEL_BASE* label = static_cast<SCH_LABEL_BASE*>( m_parent );
SCH_LABEL_BASE* label = dynamic_cast<SCH_LABEL_BASE*>( m_parent );
std::vector<std::pair<wxString, wxString>> pages;
std::vector<wxString> pageHrefs;
BOX2I bbox = GetBoundingBox();