Tweak combine inventory regex

This commit is contained in:
2023-02-13 21:18:11 +00:00
parent b5db7a3420
commit 8b39a99194
12 changed files with 78 additions and 88 deletions
+2 -5
View File
@@ -10,8 +10,8 @@ import LensHelp
setShownIntMap :: SelectionIntMap a -> SelectionIntMap a
setShownIntMap sm = case sm ^. smRegex of
"" | not (sm ^. smRegexInput) -> sm & smShownItems .~ IM.fromAscList (zip [0..] allitms)
str -> sm & smShownItems
NoSMRegex -> sm & smShownItems .~ IM.fromAscList (zip [0..] allitms)
SMRegex str _ -> sm & smShownItems
.~ IM.fromAscList (zip [0..] (f str : filter (regexList str . _siPictures) allitms))
where
allitms = sm ^. smItems
@@ -55,6 +55,3 @@ getIthYOffset :: Float -> Float -> SelectionIntMap a -> Int -> Float
getIthYOffset ygap scale sm i = (scale * 10 + ygap) * (fromIntegral yint + 1)
where
yint = getIthPos i (sm ^. smShownItems)
--selectionSectionsToIntMap :: SelectionSections a -> SelectionIntMap a
--selectionSectionsToIntMap ss = undefined