[education/rkward] rkward/plugin: Fix output getting deactivated, when preview is closed

Thomas Friedrichsmeier null at kde.org
Fri May 20 23:16:43 BST 2022


Git commit e4f7fa558ebe1da59e3196b28f7dbfa44ea79ef2 by Thomas Friedrichsmeier.
Committed on 20/05/2022 at 22:15.
Pushed by tfry into branch 'master'.

Fix output getting deactivated, when preview is closed

M  +4    -2    rkward/plugin/rkpreviewbox.cpp

https://invent.kde.org/education/rkward/commit/e4f7fa558ebe1da59e3196b28f7dbfa44ea79ef2

diff --git a/rkward/plugin/rkpreviewbox.cpp b/rkward/plugin/rkpreviewbox.cpp
index 3d7d6ba5..b5dca420 100644
--- a/rkward/plugin/rkpreviewbox.cpp
+++ b/rkward/plugin/rkpreviewbox.cpp
@@ -72,8 +72,10 @@ RKPreviewBox::RKPreviewBox (const QDomElement &element, RKComponent *parent_comp
 				RInterface::issueCommand ("local ({\n"
 				    "outfile <- tempfile (fileext='.html')\n"
 				    "rk.assign.preview.data(" + idprop + ", list (filename=outfile, on.delete=function (id) {\n"
-				    "	rk.flush.output (outfile, ask=FALSE)\n"
-				    "	unlink (outfile)\n"
+				    "	oldfile <- rk.get.output.html.file()\n"
+				    "	rk.flush.output(outfile, ask=FALSE)\n"
+				    "	unlink(outfile)\n"
+				    "	rk.set.output.html.file(oldfile)\n"
 				    "}))\n"
 				    "oldfile <- rk.set.output.html.file (outfile, style='preview')  # for initialization\n"
 				    "rk.set.output.html.file (oldfile)\n"


More information about the rkward-tracker mailing list