Disable preview in corrective mode, and notify preview when switching

2004-06-14  Philip Lafleur  <plafleur@cvs.gnome.org>

	* app/tools/gimptransformtool.c: Disable preview in corrective
	mode, and notify preview when switching transform type and
	direction.
This commit is contained in:
Philip Lafleur 2004-06-14 13:21:29 +00:00 committed by Philip Lafleur
parent 3e2690832c
commit 905b0e031e
2 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-06-14 Philip Lafleur <plafleur@cvs.gnome.org>
* app/tools/gimptransformtool.c: Disable preview in corrective
mode, and notify preview when switching transform type and
direction.
2004-06-14 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.[ch]: added new virtual function

View File

@ -280,10 +280,18 @@ gimp_transform_tool_constructor (GType type,
"notify::type",
G_CALLBACK (gimp_transform_tool_notify_type),
tr_tool, 0);
g_signal_connect_object (tool->tool_info->tool_options,
"notify::type",
G_CALLBACK (gimp_transform_tool_notify_preview),
tr_tool, 0);
g_signal_connect_object (tool->tool_info->tool_options,
"notify::direction",
G_CALLBACK (gimp_transform_tool_notify_type),
tr_tool, 0);
g_signal_connect_object (tool->tool_info->tool_options,
"notify::direction",
G_CALLBACK (gimp_transform_tool_notify_preview),
tr_tool, 0);
g_signal_connect_object (tool->tool_info->tool_options,
"notify::grid-type",
G_CALLBACK (gimp_transform_tool_notify_grid),
@ -1434,7 +1442,8 @@ gimp_transform_tool_prepare (GimpTransformTool *tr_tool,
options =
GIMP_TRANSFORM_OPTIONS (GIMP_TOOL (tr_tool)->tool_info->tool_options);
if (options->type == GIMP_TRANSFORM_TYPE_LAYER)
if (options->type == GIMP_TRANSFORM_TYPE_LAYER &&
options->direction == GIMP_TRANSFORM_FORWARD)
gimp_display_shell_set_show_transform (GIMP_DISPLAY_SHELL (gdisp->shell),
options->show_preview);
else
@ -1552,7 +1561,8 @@ gimp_transform_tool_notify_preview (GimpTransformOptions *options,
shell = GIMP_DISPLAY_SHELL (GIMP_DRAW_TOOL (tr_tool)->gdisp->shell);
if (options->type == GIMP_TRANSFORM_TYPE_LAYER)
if (options->type == GIMP_TRANSFORM_TYPE_LAYER &&
options->direction == GIMP_TRANSFORM_FORWARD)
{
gimp_display_shell_set_show_transform (shell, options->show_preview);
@ -1565,5 +1575,9 @@ gimp_transform_tool_notify_preview (GimpTransformOptions *options,
options->show_preview = show_preview;
}
else
gimp_display_shell_set_show_transform (shell, FALSE);
{
gimp_display_shell_set_show_transform (shell, FALSE);
gimp_transform_tool_expose_preview (tr_tool);
}
}