After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165078 - GIMP does not restore tool options
GIMP does not restore tool options
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.2.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
: 171024 315063 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-24 11:35 UTC by Stanislav Brabec
Modified: 2008-01-15 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stanislav Brabec 2005-01-24 11:35:33 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.
Comment 1 weskaggs 2005-01-24 17:55:58 UTC
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.
Comment 2 Stanislav Brabec 2005-01-25 11:33:16 UTC
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".
Comment 3 Michael Natterer 2005-04-11 19:23:03 UTC
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?
Comment 4 Stanislav Brabec 2005-04-12 10:52:16 UTC
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).
Comment 5 Michael Natterer 2005-04-12 12:53:16 UTC
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?
Comment 6 Stanislav Brabec 2005-04-12 13:00:52 UTC
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.
Comment 7 Michael Natterer 2005-04-12 14:15:53 UTC
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.
Comment 8 Michael Natterer 2005-04-12 14:19:08 UTC
*** Bug 171024 has been marked as a duplicate of this bug. ***
Comment 9 Michael Natterer 2005-09-02 09:38:45 UTC
*** Bug 315063 has been marked as a duplicate of this bug. ***
Comment 10 Michael Natterer 2005-09-04 10:54:35 UTC
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.