moved hiding the dialog from gimp_transform_tool_real_transform() to

2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c: moved hiding the dialog from 
	gimp_transform_tool_real_transform() to 
gimp_transform_tool_doit().
	Delay undrawing the preview in doit() until the transformation 
is
	done. This removes the annoying flicker at the end.


svn path=/trunk/; revision=26789
This commit is contained in:
Sven Neumann
2008-08-27 09:56:46 +00:00
committed by Sven Neumann
parent 915803cfa9
commit 26645c5549
2 changed files with 21 additions and 13 deletions

View File

@ -1,3 +1,10 @@
2008-08-27 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c: moved hiding the dialog from
gimp_transform_tool_real_transform() to gimp_transform_tool_doit().
Delay undrawing the preview in doit() until the transformation is
done. This removes the annoying flicker at the end.
2008-08-27 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_real_transform):

View File

@ -1066,10 +1066,7 @@ gimp_transform_tool_real_transform (GimpTransformTool *tr_tool,
TileManager *ret = NULL;
if (tr_tool->dialog)
{
gtk_widget_set_sensitive (tr_tool->dialog, FALSE);
gimp_dialog_factory_hide_dialog (tr_tool->dialog);
}
gtk_widget_set_sensitive (tr_tool->dialog, FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display),
tr_tool->progress_text, FALSE);
@ -1184,16 +1181,10 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
return;
}
gimp_dialog_factory_hide_dialog (tr_tool->dialog);
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (display->image));
if (gimp_display_shell_get_show_transform (shell))
{
gimp_display_shell_set_show_transform (shell, FALSE);
/* get rid of preview artifacts left outside the drawable's area */
gtk_widget_queue_draw (shell->canvas);
}
gimp_set_busy (display->image->gimp);
/* undraw the tool before we muck around with the transform matrix */
@ -1299,6 +1290,14 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
*/
gimp_tool_control_set_preserve (tool->control, FALSE);
if (gimp_display_shell_get_show_transform (shell))
{
gimp_display_shell_set_show_transform (shell, FALSE);
/* get rid of preview artifacts left outside the drawable's area */
gtk_widget_queue_draw (shell->canvas);
}
gimp_unset_busy (display->image->gimp);
gimp_image_flush (display->image);
@ -1357,7 +1356,9 @@ gimp_transform_tool_expose_preview (GimpTransformTool *tr_tool)
options->preview_type == GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE_GRID) &&
options->type == GIMP_TRANSFORM_TYPE_LAYER &&
options->direction == GIMP_TRANSFORM_FORWARD)
gimp_transform_tool_force_expose_preview (tr_tool);
{
gimp_transform_tool_force_expose_preview (tr_tool);
}
}
static void