Repository navigation
Add a Remember last tool preference - #60
Merged
Merged
Conversation
Off by default. When on, a new window starts with the tool the last closed one had picked, and every tool's size, colour and fill, plus the blur type. Closes #15. The tool is saved when an image window goes, not on every change, so dragging the size slider doesn't write the file over and over. A window with no picture or a video never had tools to change, so it doesn't save and can't overwrite a window that did. It sits in its own [last_tool] group of settings.ini, with tools named rather than numbered so adding a tool later doesn't shift the sizes onto the wrong ones. Switching the preference off drops the group, so switching it on again doesn't bring back an old tool.
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.
Summary
[last_tool]group insettings.ini. Tools are saved by name, not number, so adding a tool later won't shift sizes onto the wrong tool.Closes #15
Testing
last-tooltest suite (tests/test-last-tool.c): round trip of tool, widths, colours, fill and blur type; invalid values ignored; saving beside existing preferences keeps them and survives a preferences rewrite.[last_tool]group and the next window starts on the default brush at 8 px.