Skip to content

Commit

Permalink
reset subset filters when the context is exited
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Nov 7, 2023
1 parent 6fa65af commit 4fb7694
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/lua/sort/info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ function InfoOverlay:init()
end
end

function InfoOverlay:reset()
InfoOverlay.super.reset(self)
self.subviews.subset:setOption('all')
end

function InfoOverlay:get_key()
if info.current_mode == df.info_interface_mode_type.CREATURES then
if creatures.current_mode == df.unit_list_mode_type.PET then
Expand Down
5 changes: 5 additions & 0 deletions plugins/lua/sort/unitselector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ function BurrowAssignmentOverlay:register_handlers()
end
end

function BurrowAssignmentOverlay:reset()
BurrowAssignmentOverlay.super.reset(self)
self.subviews.subset:setOption('all')
end

function BurrowAssignmentOverlay:matches_filters(unit_id)
local unit = df.unit.find(unit_id)
if not unit then return false end
Expand Down

0 comments on commit 4fb7694

Please sign in to comment.