aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-03-01 09:58:10 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-03-01 09:58:10 -0700
commit5a017541203ffd4a4ec5ac566a0fc3010e512671 (patch)
treedb9b63470a9486d539bf49ce1e3181999db3f8f8
parenta569794f944285952442967b1db4a71828815293 (diff)
downloadsscan-5a017541203ffd4a4ec5ac566a0fc3010e512671.tar.gz
properly handle scanning single page PNGs
-rw-r--r--UI.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/UI.hs b/UI.hs
index 872b30a..652b4d8 100644
--- a/UI.hs
+++ b/UI.hs
@@ -85,7 +85,7 @@ drawUI st = [ui]
then (ifScanSess st
[ ("SPC", "scan next page")
, ("RET", "scan final page")
- , ("q", "declare last scanned page was the final page")
+ , ("q", "declare most recent scanned page was the final page")
, ("ESC", "abort/restart scanning this document")
]
[ ("SPC", "scan first page of multi-page document")
@@ -93,7 +93,7 @@ drawUI st = [ui]
, ("q", "quit sscan")
]
)
- else [ ("SPC", "scan page")
+ else [ ("SPC|RET", "scan page")
, ("q", "quit sscan")
]
)
@@ -107,7 +107,9 @@ handleRET :: St -> EventM () (Next St)
handleRET st = halt $ setScanSessCommand FinalPage st
handleSPC :: St -> EventM () (Next St)
-handleSPC st = halt $ setScanSessCommand NextPage st
+handleSPC st = case st^.stOutFormat of
+ PDF -> halt $ setScanSessCommand NextPage st
+ PNG -> halt $ setScanSessCommand FinalPage st
handleESC :: St -> EventM () (Next St)
handleESC st = ifScanSess st