diff --git a/docs/changelog.txt b/docs/changelog.txt index ed43775d6..286d043b3 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 - ``dfhack.job.isSuitableMaterial``: now properly detects lack of fire and magma safety for vulnerable materials with high melting points ## Misc Improvements diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 46b047254..d5d0ea7bf 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