[education/rkward] rkward/rbackend/rkwarddevice: Make sure to unsetl destroyed masks

Thomas Friedrichsmeier null at kde.org
Sat Mar 26 11:25:55 GMT 2022


Git commit d9f3d6e946a242923cec5104b65397208e78e0f2 by Thomas Friedrichsmeier.
Committed on 26/03/2022 at 11:25.
Pushed by tfry into branch 'master'.

Make sure to unsetl destroyed masks

M  +2    -0    rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp

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

diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
index c1553f40..1e2e096c 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
@@ -341,6 +341,8 @@ void RKGraphicsDevice::destroyMask(int index) {
 	RK_TRACE (GRAPHICS_DEVICE);
 	if (index < 0) cached_paths.clear();
 	else cached_paths.remove(index);
+
+	if (index < 0 || current_mask == index) current_mask = 0;
 }
 
 bool RKGraphicsDevice::setMask(int index) {



More information about the rkward-tracker mailing list