On Thu Aug 21 12:49:58 2025 +0000, Ivan Lyugaev wrote:
Yes, I agree, my interface makes writing and reading the whole file, but in the context of a small number of operations, I think it's acceptable. I focused on making the configuration file readable for manual modification (previously, I provided the writing format). An option was to store the settings in a binary file and overwrite them based on the offset provided by optno. Would it be better to store all the settings in memory and save them to a file once the scan starts or the window is closed?
Using a human-readable format makes sense to me. I think you're right - as long as there aren't too many settings, the runtime cost is probably OK.
Would it be better to store all the settings in memory and save them to a file once the scan starts or the window is closed?
I think this should be decided based on what users are most likely to expect (or want, as long as we can communicate it clearly). Personally, if there is a Cancel button, I expect clicking it, or manually closing the window, to discard any changes I've made (unless I've explicitly saved them somehow).
One could change the Cancel button to Close, and then saving settings immediately might make more sense, but I'm not sure how many people would pick up on that. I would rather be able to Cancel, but that's just a personal preference.