transformtool: We show corrective preview for selections and paths, so why not drawables

This commit is contained in:
Mikael Magnusson 2012-08-15 01:40:20 +02:00
parent 4e57571103
commit 574df2b6db
2 changed files with 7 additions and 3 deletions

View File

@ -568,8 +568,7 @@ gimp_transform_options_show_preview (GimpTransformOptions *options)
g_return_val_if_fail (GIMP_IS_TRANSFORM_OPTIONS (options), FALSE);
return (options->show_preview &&
options->type == GIMP_TRANSFORM_TYPE_LAYER &&
options->direction == GIMP_TRANSFORM_FORWARD);
options->type == GIMP_TRANSFORM_TYPE_LAYER);
}

View File

@ -782,9 +782,14 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
{
if (gimp_transform_options_show_preview (options))
{
GimpMatrix3 matrix = tr_tool->transform;
if (options->direction == GIMP_TRANSFORM_BACKWARD)
gimp_matrix3_invert (&matrix);
gimp_draw_tool_add_transform_preview (draw_tool,
tool->drawable,
&tr_tool->transform,
&matrix,
tr_tool->x1,
tr_tool->y1,
tr_tool->x2,