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

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


Git commit 1fe4d1e3f6dcae5859d45730771208c5a46fe1cd by Thomas Friedrichsmeier.
Committed on 20/05/2022 at 22:16.
Pushed by tfry into branch 'releases/0.7.4'.

Fix output getting deactivated, when preview is closed

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

https://invent.kde.org/education/rkward/commit/1fe4d1e3f6dcae5859d45730771208c5a46fe1cd

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