diff --git a/eeschema/generate_alias_info.cpp b/eeschema/generate_alias_info.cpp index f9e5e8507f..882e810d27 100644 --- a/eeschema/generate_alias_info.cpp +++ b/eeschema/generate_alias_info.cpp @@ -43,7 +43,7 @@ static const wxString FieldFormat = wxS( " __NAME__" " __VALUE__" "" ); -static const wxString DatasheetLinkFormat = wxS( "__TEXT__" ); +static const wxString LinkFormat = wxS( "__TEXT__" ); class FOOTPRINT_INFO_GENERATOR @@ -183,7 +183,7 @@ protected: } else { - wxString datasheetlink = DatasheetLinkFormat; + wxString datasheetlink = LinkFormat; datasheetlink.Replace( wxS( "__HREF__" ), EscapeHTML( text ) ); if( text.Length() > 75 ) @@ -207,7 +207,23 @@ protected: default: text = aField.GetShownText( false ); - fieldhtml.Replace( wxS( "__VALUE__" ), EscapeHTML( text ) ); + + if( aField.IsHypertext() ) + { + wxString link = LinkFormat; + link.Replace( wxS( "__HREF__" ), EscapeHTML( text ) ); + + if( text.Length() > 75 ) + text = text.Left( 72 ) + wxT( "..." ); + + link.Replace( wxS( "__TEXT__" ), EscapeHTML( text ) ); + + fieldhtml.Replace( wxS( "__VALUE__" ), link ); + } + else + { + fieldhtml.Replace( wxS( "__VALUE__" ), EscapeHTML( text ) ); + } } return fieldhtml; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index f75421158b..db33ba87ba 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -1021,6 +1021,18 @@ void SCH_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector