diff --git a/docs/changelog.txt b/docs/changelog.txt index 0670232a5..e4ef22dd5 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -57,6 +57,7 @@ Template for new versions: - `sort`: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for ## Fixes +- `sort`: fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget - `sort`: fix potential crash when removing jobs directly from the Tasks info screen ## Misc Improvements diff --git a/plugins/lua/sort.lua b/plugins/lua/sort.lua index 0c5058f44..59d928f2b 100644 --- a/plugins/lua/sort.lua +++ b/plugins/lua/sort.lua @@ -1179,7 +1179,8 @@ function SquadAssignmentOverlay:onInput(keys) -- if any click is made outside of our window, we may need to refresh our list self.dirty = true end - return SquadAssignmentOverlay.super.onInput(self, keys) + return SquadAssignmentOverlay.super.onInput(self, keys) or + (keys._MOUSE_L and self:getMouseFramePos()) end function SquadAssignmentOverlay:onRenderFrame(dc, frame_rect) @@ -1287,6 +1288,11 @@ function SquadAnnotationOverlay:init() end end +function SquadAnnotationOverlay:onInput(keys) + return SquadAnnotationOverlay.super.onInput(self, keys) or + (keys._MOUSE_L and self:getMouseFramePos()) +end + OVERLAY_WIDGETS = { squad_assignment=SquadAssignmentOverlay, squad_annotation=SquadAnnotationOverlay,