Bug 485320

Summary: Wishlist: remember scanning resolution between invocation
Product: [Frameworks and Libraries] libksane Reporter: Sergio <sergio.callegari>
Component: generalAssignee: Kåre Särs <kare.sars>
Status: RESOLVED FIXED    
Severity: wishlist CC: a.stippich
Priority: NOR    
Version First Reported In: 24.02.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sergio 2024-04-10 12:19:01 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

Every time you start skanlite, the scan resolution gets reset to a default value that is typically inappropriate. For instance, with my HP scanner, every time you start skanlite the resolution is set at 75dpi, which is not something you generally want to use.

STEPS TO REPRODUCE
1. Start skanlite
2. Set resolution to 300dpi, work
3. Exit
4. Start skanlite

OBSERVED RESULT

Resolution is not what you had previously set

EXPECTED RESULT

Skanlite should preserve, across invokations and on a pre-scanner basis, some common settings such as the resolution and possibly the scan area. 

SOFTWARE/OS VERSIONS

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.6.25-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4750HQ CPU @ 2.00GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Pro Graphics P5200
Manufacturer: Notebook
Product Name: W740SU
System Version: Not Applicable

ADDITIONAL INFORMATION

N/A
Comment 1 Kåre Särs 2024-04-11 12:51:24 UTC
Thanks for the report!

This is most probably an issue with the order of the scanner options.

When we save the options, we write them back in that same order that we get them. if the resolution is set before the scan source or mode, the resolution is probably reset when the scan-source or mode is set....

There would be a need to make it possible to apply the saved options in the right order.... I wonder if some crashes with some backends might be because of this order too...
Comment 2 Bug Janitor Service 2025-06-01 10:30:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/ksanecore/-/merge_requests/33
Comment 3 Alexander Stippich 2025-06-04 17:23:34 UTC
Git commit d0be42f900ddbb02ee22973b64dae10b6a20a480 by Alexander Stippich.
Committed on 01/06/2025 at 10:15.
Pushed by astippich into branch 'master'.

always set resolution option last

Hopefully fixes
Related: bug 503336

M  +16   -0    src/interface.cpp

https://invent.kde.org/libraries/ksanecore/-/commit/d0be42f900ddbb02ee22973b64dae10b6a20a480