diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 7ff3d8f5f6..a2b0ade1e6 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -1304,8 +1304,8 @@ bool PDF_PLOTTER::EndPlot() for( const auto& [ linkHandle, linkPair ] : m_hyperlinkHandles ) { - const BOX2D& box = linkPair.first; - const wxString& url = linkPair.second; + BOX2D box = linkPair.first; + wxString url = linkPair.second; startPdfObject( linkHandle ); @@ -1345,6 +1345,9 @@ bool PDF_PLOTTER::EndPlot() } else { + if( m_project ) + url = ResolveUriByEnvVars( url, m_project ); + fprintf( m_outputFile, "/A << /Type /Action /S /URI /URI %s >>\n" ">>\n", diff --git a/eeschema/tools/sch_navigate_tool.cpp b/eeschema/tools/sch_navigate_tool.cpp index 936fe970fb..76e3079aa0 100644 --- a/eeschema/tools/sch_navigate_tool.cpp +++ b/eeschema/tools/sch_navigate_tool.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "eda_doc.h" @@ -74,9 +75,10 @@ void SCH_NAVIGATE_TOOL::CleanHistory() } -void SCH_NAVIGATE_TOOL::HypertextCommand( const wxString& href ) +void SCH_NAVIGATE_TOOL::HypertextCommand( const wxString& aHref ) { wxString destPage; + wxString href = ResolveUriByEnvVars( aHref, &m_frame->Prj() ); if( href == SCH_NAVIGATE_TOOL::g_BackLink ) { diff --git a/eeschema/tools/sch_navigate_tool.h b/eeschema/tools/sch_navigate_tool.h index 6cacfc45e1..ebc00f8792 100644 --- a/eeschema/tools/sch_navigate_tool.h +++ b/eeschema/tools/sch_navigate_tool.h @@ -65,7 +65,7 @@ public: ///< Navigate to next sheet by numeric sheet number int Next( const TOOL_EVENT& aEvent ); - void HypertextCommand( const wxString& href ); + void HypertextCommand( const wxString& aHref ); bool CanGoBack(); bool CanGoForward();