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.
This commit is contained in:
Ell 2018-08-03 21:45:06 -04:00
parent bd726c96bf
commit bb5e3fd926
1 changed files with 9 additions and 9 deletions

View File

@ -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;
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));
gimp_projectable_invalidate_preview (projectable);
}
proj->priv->invalidate_preview = TRUE;
}