Cleanup Action datatypes, clear sel set if scroll different section
This commit is contained in:
@@ -28,8 +28,13 @@ import Geometry.Data
|
||||
scrollSelectionSections :: Int -> IMSS a -> Maybe Selection -> Maybe Selection
|
||||
scrollSelectionSections yi sss msel
|
||||
| yi == 0 = msel
|
||||
| yi > 0 = foldl' (&) msel $ replicate yi (ssScrollUsing ssLookupUp sss)
|
||||
| otherwise = foldl' (&) msel $ replicate (negate yi) (ssScrollUsing ssLookupDown sss)
|
||||
| yi > 0 = g $ foldl' (&) msel $ replicate yi (ssScrollUsing ssLookupUp sss)
|
||||
| otherwise = g $ foldl' (&) msel $ replicate (negate yi) (ssScrollUsing ssLookupDown sss)
|
||||
where
|
||||
g msel'
|
||||
| msel'^?_Just.slSec /= msel^?_Just.slSec
|
||||
= msel'&_Just.slSet.~IS.empty
|
||||
| otherwise = msel'
|
||||
|
||||
nextInSectionSS :: IMSS a -> Maybe Selection -> Maybe Selection
|
||||
nextInSectionSS = ssScrollUsing ssLookupNextMax
|
||||
|
||||
Reference in New Issue
Block a user