[education/rkward] rkward/windows: Fix device window always nagging on close

Thomas Friedrichsmeier null at kde.org
Mon Mar 14 17:31:30 GMT 2022

Git commit 7148e5565feeeded8440f5d316645263afce6562 by Thomas Friedrichsmeier.
Committed on 14/03/2022 at 17:31.
Pushed by tfry into branch 'master'.

Fix device window always nagging on close

M  +1    -0    rkward/windows/rkwindowcatcher.cpp


diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index 9ca6dca6..78dcd023 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -374,6 +374,7 @@ void RKCaughtX11Window::commonClose(bool in_destructor) {
 		close_attempted = true;
 	} else {
+		if (in_destructor) return;
 		if (KMessageBox::questionYesNo(this, i18n("<p>The graphics device is being closed, saving the last plot to the plot history. This may take a while, if the R backend is still busy. You can close the graphics device immediately, in case it is stuck. However, the last plot may be missing from the plot history, if you do this.</p>")
 #if !defined Q_OS_WIN
 		+ i18n("<p>Note: On X11, the embedded window may be expurged, and you will have to close it manually in this case.</p>")

More information about the rkward-tracker mailing list