Repository navigation
fix(gui): --history given on the command line beats the saved layout - #12
Merged
Merged
Conversation
It did nothing whenever a layout existed, which since last week is always for the bundled demo: the station read the depth out of the layout file and overwrote whatever the flag said. A flag that looks honoured and is not. The decision the TODO was waiting on: the command line wins, the way it does over a config file everywhere else. Left out, the layout's depth stands. What made it possible to tell them apart is that `--history` is now an `Option<usize>` rather than a `default_value_t`: given as 4096 and defaulted to 4096 were the same value and had to stop being the same instruction. The gui's entry point takes a `Startup` carrying what the operator asked for this run, which is also where the screenshot request moved to. The depth in force is written back into the layout, so a save records it. A depth somebody asked for that reverted silently on the next start would be the same complaint one place along. TODO(gs-gui-history-precedence) is closed; the index counts move with it, and one of them was already stale. 538 tests, fmt and clippy clean.
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.
--historydid nothing whenever a layout file existed — which, since the JPSS layout started shipping, is always for the bundled demo. The station read the depth out of the layout and overwrote whatever the flag said.The decision
TODO(gs-gui-history-precedence)was waiting on: the command line wins, the way it does over a config file everywhere else. Left out, the layout's depth stands.What made the two distinguishable is that
--historyis nowOption<usize>rather than adefault_value_t— given as 4096 and defaulted to 4096 were the same value and had to stop being the same instruction. The gui entry point now takes aStartupcarrying what the operator asked for this run; the screenshot request moved into it too.The depth in force is written back into the layout so a save records it: a depth somebody asked for that reverted silently on the next start would be the same complaint one place along.
The decision is a pure function with its own tests, so it did not need a window to cover.
538 tests, fmt and clippy clean.