mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Don't assume a hypertext link is a cross-sheet reference.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20511
This commit is contained in:
parent
2b0d082df5
commit
582aef0220
@ -1012,11 +1012,14 @@ void SCH_FIELD::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const
|
||||
constexpr int START_ID = 1;
|
||||
|
||||
if( IsHypertext() )
|
||||
{
|
||||
wxString href;
|
||||
|
||||
if( m_id == FIELD_T::INTERSHEET_REFS )
|
||||
{
|
||||
SCH_LABEL_BASE* label = static_cast<SCH_LABEL_BASE*>( m_parent );
|
||||
SCH_SHEET_PATH* sheet = &label->Schematic()->CurrentSheet();
|
||||
wxMenu menu;
|
||||
wxString href;
|
||||
|
||||
std::vector<std::pair<wxString, wxString>> pages;
|
||||
|
||||
@ -1038,6 +1041,11 @@ void SCH_FIELD::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const
|
||||
href = wxT( "#" ) + pages[ sel ].first;
|
||||
else if( sel == 999 )
|
||||
href = SCH_NAVIGATE_TOOL::g_BackLink;
|
||||
}
|
||||
else if( IsURL( GetShownText( false ) ) )
|
||||
{
|
||||
href = GetShownText( false );
|
||||
}
|
||||
|
||||
if( !href.IsEmpty() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user