diff --git a/ChangeLog b/ChangeLog index 1c0ffbfefe..2f67b839c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-05-13 Michael Natterer + + * app/actions/tools-actions.c (tools_actions_update): don't use + action_data_get_context() to update the "tools" action group + because it may return NULL. Use gimp_get_user_context() instead + because the active tool is global regardless of the action group's + context. Fixes accidential tool hiding when closing the last + display. + 2004-05-13 Sven Neumann * libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save_thumb): oops. diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c index e9cb5c63d2..c3aad6977c 100644 --- a/app/actions/tools-actions.c +++ b/app/actions/tools-actions.c @@ -165,7 +165,7 @@ tools_actions_update (GimpActionGroup *group, GimpContext *context; GimpToolInfo *tool_info = NULL; - context = action_data_get_context (data); + context = gimp_get_user_context (group->gimp); if (context) tool_info = gimp_context_get_tool (context); @@ -176,7 +176,9 @@ tools_actions_update (GimpActionGroup *group, gimp_action_group_set_action_active (group, action, (condition) != 0) SET_SENSITIVE ("tools-visibility", tool_info); - SET_ACTIVE ("tools-visibility", tool_info && tool_info->visible); + + if (tool_info) + SET_ACTIVE ("tools-visibility", tool_info->visible); #undef SET_SENSITIVE #undef SET_ACTIVE