Skip to content

Commit e177787

Browse files
warning cleanup 3
1 parent 18c0097 commit e177787

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/Potato/Flow/Controller/Manipulator/Box.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import Potato.Flow.Types
2424
import Potato.Flow.OwlItem
2525
import Potato.Flow.Owl
2626
import Potato.Flow.OwlState
27-
import Potato.Flow.OwlWorkspace
2827
import Potato.Flow.Methods.Types
2928
import Potato.Flow.Llama
3029
import Potato.Flow.Methods.LlamaWorks
@@ -187,7 +186,7 @@ makeDragDeltaBox bht rmd = r where
187186
-- reduces the DeltaLBox such that the LBox does not invert
188187
-- assumes LBox is canonical and that LBox is not already smaller than the desired constrained size
189188
constrainDeltaLBox :: Int -> DeltaLBox -> LBox -> DeltaLBox
190-
constrainDeltaLBox minsize d1@(DeltaLBox (V2 dx dy) (V2 dw dh)) d2@((LBox (V2 x y) (V2 w h))) = r where
189+
constrainDeltaLBox minsize d1@(DeltaLBox (V2 dx dy) (V2 dw dh)) (LBox _ (V2 w h)) = r where
191190
optuple e = (e, -e)
192191

193192
(ndx, ndw) = if dx /= 0
@@ -231,12 +230,13 @@ makeDragOperation :: PotatoHandlerInput -> DeltaLBox -> Maybe Llama
231230
makeDragOperation phi dbox = op where
232231
selection = transformableSelection phi
233232
selectionl = toList $ transformableSelection phi
234-
pfs = _potatoHandlerInput_pFState phi
235-
lboxes = fmap (\sowl -> _sEltDrawer_box (getDrawer . hasOwlItem_toOwlSubItem $ sowl) pfs) selectionl
236-
233+
234+
237235
-- go through each element in selection and ensure that dbox does not invert that element
238236
-- DANGER you need to make sure you have sensible bounding box functions or you might put things in a non-resizeable state
239-
constraineddbox = foldl' (constrainDeltaLBox 0) dbox lboxes
237+
--pfs = _potatoHandlerInput_pFState phi
238+
--lboxes = fmap (\sowl -> _sEltDrawer_box (getDrawer . hasOwlItem_toOwlSubItem $ sowl) pfs) selectionl
239+
--constraineddbox = foldl' (constrainDeltaLBox 0) dbox lboxes
240240

241241
makeController _ = cmd where
242242
cmd = CTagBoundingBox :=> (Identity $ CBoundingBox {

src/Potato/Flow/Controller/Manipulator/BoxText.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import Potato.Flow.Math
2727
import Potato.Flow.Serialization.Snake
2828
import Potato.Flow.Types
2929
import Potato.Flow.Owl
30-
import Potato.Flow.OwlWorkspace
3130
import Potato.Flow.Llama
3231
import Potato.Flow.Preview
3332

@@ -367,8 +366,8 @@ updateBoxLabelHandlerState reset selection tah@BoxLabelHandler {..} = assert tzI
367366
}
368367

369368

370-
inputBoxLabel :: TextInputState -> Bool -> SuperOwl -> KeyboardKey -> (TextInputState, Maybe Llama)
371-
inputBoxLabel tais undoFirst sowl kk = (newtais, mop) where
369+
inputBoxLabel :: TextInputState -> SuperOwl -> KeyboardKey -> (TextInputState, Maybe Llama)
370+
inputBoxLabel tais sowl kk = (newtais, mop) where
372371
(changed, newtais) = inputSingleLineZipper tais kk
373372
newtext = TZ.value (_textInputState_zipper newtais)
374373
controller = CTagBoxLabelText :=> (Identity $ CMaybeText (DeltaMaybeText (_textInputState_original tais, if newtext == "" then Nothing else Just newtext)))
@@ -428,7 +427,7 @@ instance PotatoHandler BoxLabelHandler where
428427

429428
-- TODO decide what to do with mods
430429

431-
(nexttais, mllama) = inputBoxLabel _boxLabelHandler_state _boxLabelHandler_undoFirst sowl k
430+
(nexttais, mllama) = inputBoxLabel _boxLabelHandler_state sowl k
432431
r = def {
433432
_potatoHandlerOutput_nextHandler = Just $ SomePotatoHandler tah {
434433
_boxLabelHandler_state = nexttais

0 commit comments

Comments
 (0)