app: always update full drawable region if it has filters
When a drawable has filters attached, they may influence the area
affected by drawable updates. Currently, we ignore that, updating
the original region regardless. This can lead to drawable updates
not affecting the correct regions. This couldn't be triggered
until now, but since layer groups can now have a transform op
attached as a filter, updates to their sublayers -- which can
happen while the transform tool is active -- run into this problem.
Fix it for now by simply updating the full drawable region when the
drawable has filters. This is a very conservative approach -- we
don't even bother checking if we're only dealing with point
filters, as this change only influences transformed groups right
now. Ultimately, we need to rely on node invalidation to drive
updates, which takes this into account.
(cherry picked from commit 8be0e646bc
)
This commit is contained in:
@ -1092,6 +1092,16 @@ gimp_drawable_update (GimpDrawable *drawable,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
|
||||
/* TODO: if the drawable has filters, they may influence the region affected
|
||||
* by the update, but we don't currently handle this. for now, do the most
|
||||
* conservative thing and simply update the entire drawable.
|
||||
*/
|
||||
if (! gimp_container_is_empty (drawable->private->filter_stack))
|
||||
{
|
||||
width = -1;
|
||||
height = -1;
|
||||
}
|
||||
|
||||
if (width < 0)
|
||||
{
|
||||
GeglRectangle bounding_box;
|
||||
|
Reference in New Issue
Block a user