diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-01 09:58:10 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-01 09:58:10 -0700 |
commit | 5a017541203ffd4a4ec5ac566a0fc3010e512671 (patch) | |
tree | db9b63470a9486d539bf49ce1e3181999db3f8f8 | |
parent | a569794f944285952442967b1db4a71828815293 (diff) | |
download | sscan-5a017541203ffd4a4ec5ac566a0fc3010e512671.tar.gz |
properly handle scanning single page PNGs
-rw-r--r-- | UI.hs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 |