From 171df6864c20e5172edd85916c283f0d009128ae Mon Sep 17 00:00:00 2001 From: Grim Maple Date: Thu, 10 Nov 2022 16:36:32 +0300 Subject: [PATCH] Fix #634 Disallow clicking if state isn't Pressed --- src/dlangui/widgets/widget.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dlangui/widgets/widget.d b/src/dlangui/widgets/widget.d index f54a38b9..83283538 100644 --- a/src/dlangui/widgets/widget.d +++ b/src/dlangui/widgets/widget.d @@ -1280,7 +1280,7 @@ public: setFocus(); return true; } - if (event.action == MouseAction.ButtonUp && event.button == MouseButton.Left) { + if (event.action == MouseAction.ButtonUp && event.button == MouseButton.Left && state & State.Pressed) { resetState(State.Pressed); handleClick(); return true;