Repository navigation
Up axis preference survives a restart - #327
Open
DonnieAlex wants to merge 1 commit into
Open
DonnieAlex wants to merge 1 commit into
DonnieAlex wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No linked issue: the up axis chosen in Preferences > Settings did not survive a restart.
What was wrong and what happens now
The interface kept a second copy of the optionVars in memory.
optionVarand the Preferences window wrote thesession's copy, while the autosave settings wrote the interface copy, whose
upAxisDirectionwas still the value thesession started with. Saving Preferences runs the autosave settings after the up-axis saver, so the stale copy was
written over
optionVars.jsonand the next start read the old axis back.There is now one optionVars store, the session's. The
optionVarcommand, the Preferences window and the autosavesettings all read and write it, and the core saves it after each command. The redundant interface-side
optionVarcommand was removed: the scene layer's full one is the command that already runs.
What I checked (steps in the app, tests run, and what I could not check)
reported Y in the session, but
optionVars.jsonwas written back to Z during the same Save.optionVars.jsonaty; a restart reportsupAxisandoptionVar upAxisDirectionbothy.autosave_settings_do_not_put_the_old_up_axis_backtotests/world_settings.rs: it reads the autosavesettings first, changes the up axis, then saves autosave settings, and checks the file.
cargo test -p aztek_host --test autosave --test cmds_u17 --test cmds_u20 --test world_settingspasses.use_prefs()before creating its second session, as the application's startup does;the previous path relied on the removed interface copy.
./build.shand ran the flow above on the built AppRun.How it was made (by hand, or with an LLM; built and run, or not)
Made with an LLM, built and run on Linux.