From 8b378735faeedfcac884c4b2db6b67f50aacb1b2 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 17 Feb 2023 14:23:07 -0800 Subject: [PATCH 1/2] don't fire HotkeyLabel if the label is disabled --- library/lua/gui/widgets.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 3ef27a651..9fbae2cee 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -1472,7 +1472,8 @@ end function HotkeyLabel:onInput(keys) if HotkeyLabel.super.onInput(self, keys) then return true - elseif keys._MOUSE_L_DOWN and self:getMousePos() and self.on_activate then + elseif keys._MOUSE_L_DOWN and self:getMousePos() and self.on_activate + and not is_disabled(self) then self.on_activate() return true end From 2e53c5bc6df67664317b183a9f97c0f5870b7545 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 24 Feb 2023 17:14:27 -0800 Subject: [PATCH 2/2] update changelog --- docs/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index 4eb816c29..d8b86e46a 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## New Plugins ## Fixes +-@ ``widgets.HotkeyLabel``: don't trigger on click if the widget is disabled ## Misc Improvements