[gimp/gimp-2-10] app: in GimpDrawableFilter, only update crop/preview area when updating whole drawable



commit a330a94b944c7ad72655fcc027c8c503b0932637
Author: Ell <ell_se yahoo com>
Date:   Sun Dec 30 05:04:58 2018 -0500

    app: in GimpDrawableFilter, only update crop/preview area when updating whole drawable
    
    In GimpDrawableFilter, when updating the entire filter area, only
    update the crop/preview area (as set by
    gimp_drawable_filter_set_{crop,preview}()), instead of the entire
    drawable.
    
    (cherry picked from commit b846ffed194aecab00afd2854662a53a7388cdde)

 app/core/gimpdrawablefilter.c | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/app/core/gimpdrawablefilter.c b/app/core/gimpdrawablefilter.c
index 2b50d648b1..e9487a375e 100644
--- a/app/core/gimpdrawablefilter.c
+++ b/app/core/gimpdrawablefilter.c
@@ -997,25 +997,27 @@ gimp_drawable_filter_update_drawable (GimpDrawableFilter  *filter,
 
   if (area)
     {
-      if (! gimp_rectangle_intersect (area->x,
-                                      area->y,
-                                      area->width,
-                                      area->height,
-                                      filter->filter_area.x,
-                                      filter->filter_area.y,
-                                      filter->filter_area.width,
-                                      filter->filter_area.height,
-                                      &update_area.x,
-                                      &update_area.y,
-                                      &update_area.width,
-                                      &update_area.height))
+      if (! gegl_rectangle_intersect (&update_area,
+                                      area, &filter->filter_area))
         {
           return;
         }
     }
   else
     {
-      update_area = filter->filter_area;
+      gimp_drawable_filter_get_crop_rect (filter,
+                                          filter->crop_enabled,
+                                          &filter->crop_rect,
+                                          filter->preview_enabled,
+                                          filter->preview_alignment,
+                                          filter->preview_position,
+                                          &update_area);
+
+      if (! gegl_rectangle_intersect (&update_area,
+                                      &update_area, &filter->filter_area))
+        {
+          return;
+        }
     }
 
   if (update_area.width  > 0 &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]