From 698fffb128f3ad09a5fd16d91e3101c7661c167f Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 3 Jul 2023 09:13:31 +0300 Subject: [PATCH] PDF plotting: Fix "Show Page" in Foxit PDF Reader. pageNum is an Integer. Acrobat seems to convert automatically. --- common/plotters/PDF_plotter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 7a159696f8..4519b11653 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -1223,7 +1223,7 @@ bool PDF_PLOTTER::EndPlot() js += wxT( "var cChoice = app.popUpMenuEx.apply\\( app, aParams \\); " ); js += wxT( "if\\( cChoice != null && cChoice.substring\\( 0, 1 \\) == '#' \\)" - " this.pageNum = cChoice.slice\\( 1 \\); " ); + " this.pageNum = parseInt\\( cChoice.slice\\( 1 \\) \\); " ); js += wxT( "else if\\( cChoice != null && cChoice.substring\\( 0, 4 \\) == 'http' \\)" " app.launchURL\\( cChoice \\);" );