Commit before rethinking selection sets

This commit is contained in:
2026-05-12 08:05:39 +01:00
parent b213525c21
commit e4bd971017
5 changed files with 106 additions and 105 deletions
+4 -1
View File
@@ -95,8 +95,11 @@ rmInvItem cid invid w =
where
pointcid = cWorld . lWorld . creatures . ix cid
updateselectionextra
| cid == 0 = hud . diSelection . _Just . slSet %~ const mempty
| cid == 0 = hud . diSelection . _Just . slSet %~ IS.foldl' h mempty
| otherwise = id
h x i | i > _unNInt invid = IS.insert (i-1) x
| i < _unNInt invid = IS.insert i x
| otherwise = x
updateselection
| cid == 0 && cr ^? crManipulation . manObject . imSelectedItem == Just invid =
scrollAugInvSel (-1) . scrollAugInvSel 1