[simple-scan/cherry-pick-7630ddc7] Set Scan Area to Maximum in case, automatic mode were enabled.




commit df4527f6b863539dc5f719028a8e9ed10ed6c11a
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Thu Apr 2 14:31:03 2020 +0000

    Set Scan Area to Maximum in case, automatic mode were enabled.
    
    Fix: #90
    
    
    (cherry picked from commit 7630ddc7f9632ce692cf6ba0321d7d39eddbae38)

 src/scanner.vala | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index dc58f146..8ad7fbc6 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -1135,7 +1135,12 @@ public class Scanner : Object
                 else
                     set_option_to_max (handle, option, index);
             }
-
+            if (job.page_width == 0) /* #90 Fix automatic mode for Epson scanners */
+            {
+                option = get_option_by_name (handle, "scan-area", out index);
+                if (option != null)
+                    set_string_option (handle, option, index, "Maximum", null);
+            }
             /* Set page size */
             option = get_option_by_name (handle, Sane.NAME_PAGE_WIDTH, out index);
             if (option != null && job.page_width > 0.0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]