Commit 57d09bed authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

don't use action_data_get_context() to update the "tools" action group

2004-05-13  Michael Natterer  <mitch@gimp.org>

	* 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.
parent 81dcecc9
2004-05-13 Michael Natterer <mitch@gimp.org>
* 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 <sven@gimp.org>
* libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save_thumb): oops.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment