ADDED: Go to page hyperlinks in schematic editor (virtual page numbers)

The problem is that "real" page numbers can be duplicated, so we work around it
by using virtual page numbers instead which are guaranteed unique.

Example "goto:3" will go to page 3. If customised page numbers are used such as
a, b, c, then to go to page b, we should specify goto:2 (i.e. the virtual page
number).
This commit is contained in:
Roberto Fernandez Bautista
2022-08-27 19:17:42 +01:00
committed by Jeff Young
parent 5d90f3f54f
commit 9b007ca4bf
7 changed files with 95 additions and 26 deletions
+4 -4
View File
@@ -352,7 +352,7 @@ public:
KIFONT::FONT* aFont = nullptr,
void* aData = nullptr ) override;
virtual void HyperlinkBoxURL( const BOX2I& aBox, const wxString& aDestinationURL ) override;
virtual void HyperlinkBox( const BOX2I& aBox, const wxString& aDestinationURL ) override;
/**
* PDF images are handles as inline, not XObject streams...
@@ -417,11 +417,11 @@ protected:
FILE* m_workFile; ///< Temporary file to construct the stream before zipping
std::vector<long> m_xrefTable; ///< The PDF xref offset table
///< List of loaded URLs in current page
std::vector<std::pair<BOX2I, wxString>> m_urlHyperlinksInPage;
///< List of loaded hyperlinks in current page
std::vector<std::pair<BOX2I, wxString>> m_hyperlinksInPage;
///< Handles for all the hyperlink objects that will be deferred
std::map<int, std::pair<BOX2D, wxString>> m_urlHyperlinksHandles;
std::map<int, std::pair<BOX2D, wxString>> m_hyperlinkHandles;
};