GNOME Bugzilla – Bug 165078
GIMP does not restore tool options
Last modified: 2008-01-15 12:46:14 UTC
Run GIMP. Select different paintbrush (gradient, pattern). Quit GIMP. Look at ~/.gimp-2.2/tool-options - values are properly saved (at least for gradient strings are in localised representation) Run GIMP. Tool options are in the default values. Quit GIMP. Look at ~/.gimp-2.2/tool-options - default values are there. I did not found any setting in preferences, which can cause this behavior.
This is actually a tricky issue. In most cases it is better to reset to the defaults when starting a new session. For example, if I need to use the paintbrush once in Multiply mode, it is very annoying if it comes up in Multiply mode the next time I start GIMP. That is what used to happen, and the current behavior is mainly an improvement. The thing that is needed is a button for saving the current settings as new defaults, so that the user can have some control over this.
Current state is save every time, but not restore. You are true, it should be configurable in Preferences like input devices setting - "Save on quit", "Save now", "Reset to defaults".
I totally agree with comment #2, in fact I have already implemented this on my disk. However, I am absolutely unable to reproduce the bug. Tool options are saved *and* loaded unconditionally. Stanislav, can you still reproduce the problem?
Yes, I can: - Double click to paintbrush - Select different brush - Quit GIMP - Start GIMP - Default brush is selected. Note that I have in preferences set, that all paint options are shared between tools (and maybe implementation of this feature has broken tool option restore). Also note that tool selection is forgotten, too (and paintbrush tool is selected).
I think I know what happens. My guess is that your system is set up as follows: - Global brush, pattern, gradient, font enabled. - Device saving or loading disabled. - All tool options except fg, bg, brush, pattern and gradient are restored correctly (because these are restored from devicerc). Are these assumptions correct?
Yes. For example Eraser Hard edges are kept. After checking "Save input device settings on exit" on GIMP restores both last selected tool and upper mentioned tool options. But even without checking it on, values are saved to ~/.gimp-2.2/tool-options.
Thanks, that makes everything clear. And yes, the values are saved in ~/.gimp-2.2/tool-options, the voodoo happens when loading them. We need to add saving and loading of the global context independently of input device settings.
*** Bug 171024 has been marked as a duplicate of this bug. ***
*** Bug 315063 has been marked as a duplicate of this bug. ***
Fixed in CVS: 2005-09-04 Michael Natterer <mitch@gimp.org> Cleaned up and fixed the order in which default tool options and user context values are initialized, and added loading / saving of the global user context. Fixes bug #165078. * app/core/Makefile.am * app/core/gimp-contexts.[ch]: new files which manage the global contexts. Contains gimp_contexts_init/exit/load/save/clear(). * app/core/gimp.c: use the new init/exit functions instead of implementing the stuff here. * app/tools/gimp-tools.c: load/save/clear the user context from here so it follows the same logic as the tool options. Reset all tool options before loading the user context and copy the user context's property to all tool options before loading tool options. * app/core/gimptoolinfo.c (gimp_tool_info_new): don't initialize the tool options with the users context's properties. It's way too early here and they will be overwritten later. * app/widgets/gimpdevices.c (gimp_devices_restore): initialize all device contexts with the user context's properties before loading the devices and copying the active one back to the user context.