Ensure the DATASHEET field value only is used to know the datasheet URL.
previously, if the field option "show name" is set, the field name was added to the URL, that broke it. Fixes #13729 https://gitlab.com/kicad/code/kicad/issues/13729
This commit is contained in:
parent
8b6fda2890
commit
29fd1b45d6
|
@ -289,8 +289,13 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
|
SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
|
||||||
|
|
||||||
// Use GetShownText() to resolve any text variables
|
// Use GetShownText() to resolve any text variables, but uve only field value
|
||||||
datasheet = symbol->GetField( DATASHEET_FIELD )->GetShownText();
|
// (do not allow adding field name )
|
||||||
|
SCH_FIELD* tmp = symbol->GetField( DATASHEET_FIELD );
|
||||||
|
bool name_shown = tmp->IsNameShown();
|
||||||
|
tmp->SetNameShown( false );
|
||||||
|
datasheet = tmp->GetShownText();
|
||||||
|
tmp->SetNameShown( name_shown );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( datasheet.IsEmpty() || datasheet == wxT( "~" ) )
|
if( datasheet.IsEmpty() || datasheet == wxT( "~" ) )
|
||||||
|
|
Loading…
Reference in New Issue