mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 10:00:13 +00:00
Resolve variables in hrefs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20340
This commit is contained in:
parent
f9b19bbb5b
commit
f4a5404e0a
@ -1296,8 +1296,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 );
|
||||
|
||||
@ -1337,6 +1337,9 @@ bool PDF_PLOTTER::EndPlot()
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_project )
|
||||
url = ResolveUriByEnvVars( url, m_project );
|
||||
|
||||
fmt::print( m_outputFile,
|
||||
"/A << /Type /Action /S /URI /URI {} >>\n"
|
||||
">>\n",
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <eeschema_id.h>
|
||||
#include <tools/sch_actions.h>
|
||||
#include <tools/sch_navigate_tool.h>
|
||||
#include <common.h>
|
||||
#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 )
|
||||
{
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user