[gimp] Bug 541586 - Tool options not saved/loaded correctly?
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 541586 - Tool options not saved/loaded correctly?
- Date: Sun, 18 Apr 2010 10:49:43 +0000 (UTC)
commit 547c92d0f646710887890621615f4b2777657955
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 18 12:47:18 2010 +0200
Bug 541586 - Tool options not saved/loaded correctly?
Don't overwrite the entire context part of all tool options with
values from contextrc, or we will end up with one tool option set to a
non-default values affecting all other tool options that were at their
default value in the next gimp session.
app/tools/gimp-tools.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index c883937..f51beae 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -303,9 +303,17 @@ gimp_tools_restore (Gimp *gimp)
GimpToolOptionsGUIFunc options_gui_func;
GtkWidget *options_gui;
+ /* copy all context properties except those the tool actually
+ * uses, because the subsequent deserialize() on the tool
+ * options will only set the properties that were set to
+ * non-default values at the time of saving, and we want to
+ * keep these default values as if they have been saved.
+ * (see bug #541586).
+ */
gimp_context_copy_properties (gimp_get_user_context (gimp),
GIMP_CONTEXT (tool_info->tool_options),
- GIMP_CONTEXT_ALL_PROPS_MASK);
+ GIMP_CONTEXT_ALL_PROPS_MASK &~
+ tool_info->context_props);
gimp_tool_options_deserialize (tool_info->tool_options, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]