Page 1 of 1

[1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Fri Mar 29, 2024 12:15 pm
by mrvn
I'm copying a large save game over a slow connection (simulate with rsync --bwlimit) into the saves folder. At the same time I'm trying to load a game in factorio. When I try to scroll through the available games it always jumps right back to have the currently selected game visible making it appear as if scrolling is impossible.

My guess is the logic that detects new games in the saves folder also triggers when the size of a file changes. But why scroll to show the currently selected game when a new game is added to the saves folder at all?

Re: [1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Fri Mar 29, 2024 12:51 pm
by Rseding91
Thanks for the report. The reason it scrolls back to the selection is due to how the GUI refreshes the list. When file contents change it refreshes by deleting everything in the list and then re-adding them. After it finishes that it scrolls to the selected save file. So if the files are constantly changing it is constantly refreshing and re-scrolling to the selected save file.

I don't consider it worth the extra GUI code to try to avoid this since changing saves is not normally a slow operation.

Re: [1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Fri Mar 29, 2024 2:22 pm
by mrvn
Why can't it remember the item visible at the top instead of scrolling to the selected item?

Re: [1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Fri Mar 29, 2024 2:26 pm
by Rseding91
mrvn wrote:
Fri Mar 29, 2024 2:22 pm
Why can't it remember the item visible at the top instead of scrolling to the selected item?
Because that's not the default, and doing that is exactly the "extra GUI code" I want to avoid. If you want to avoid it, sync with a different folder and move to the actual saves folder when it's done downloading.

Re: [1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Tue Apr 02, 2024 2:28 pm
by mrvn
It's creating a hidden file with a random extension and only at the end it gets renamed to the real, non-hidden name. So I'm a bit surprised the game doesn't ignore it.

Re: [1.1.100] Load dialog constantly scrolls back to selected item while something is writing in the saves folder

Posted: Wed Apr 03, 2024 1:17 pm
by Rseding91
mrvn wrote:
Tue Apr 02, 2024 2:28 pm
It's creating a hidden file with a random extension and only at the end it gets renamed to the real, non-hidden name. So I'm a bit surprised the game doesn't ignore it.
The game can open saves that have been extracted into folders so the list of file types it needs to care about is more than just .zip. But in general it's just a simple "something in the saves folder changed, refresh the GUI".