Commit 53afeb11 authored by Ell's avatar Ell

app: fix gimp_projection_projectable_bounds_changed()

In gimp_projection_projectable_bounds_changed(), which is called by
GimpProjection in response to a GimpProjectable::bounds-changed
signal, invalidate all regions of the new projection that weren't
copied from the old projection, so that they get rendered upon
flushing, instead of remaining empty.

Additionally, fix preview invalidation -- in particular, don't
directly invalidate the projectable's preview, even if preview
invalidation is already queued and chunk rendering was finished by
the boundary change, and instead always queue a preview
invalidation.

(cherry picked from commit bb5e3fd9)
parent a1d2c05f
......@@ -1237,14 +1237,14 @@ gimp_projection_projectable_bounds_changed (GimpProjectable *projectable,
&proj->priv->priority_rect.height);
}
if (proj->priv->chunk_render.idle_id)
{
proj->priv->invalidate_preview = TRUE;
}
else
{
proj->priv->invalidate_preview = FALSE;
gimp_projectable_invalidate_preview (projectable);
}
if (dx > 0)
gimp_projection_add_update_area (proj, 0, 0, dx, h);
if (dy > 0)
gimp_projection_add_update_area (proj, 0, 0, w, dy);
if (dx + old_w < w)
gimp_projection_add_update_area (proj, dx + old_w, 0, w - (dx + old_w), h);
if (dy + old_h < h)
gimp_projection_add_update_area (proj, 0, dy + old_h, w, h - (dy + old_h));
proj->priv->invalidate_preview = TRUE;
}
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