[gimp] app: exclusive visibility toggle should also update same level items.



commit 970e9aca90760433490555560a472149ddabb57c
Author: Jehan <jehan girinstud io>
Date:   Fri Jun 23 20:35:25 2017 +0200

    app: exclusive visibility toggle should also update same level items.
    
    When toggling visibility of a child in an item group, we should also
    toggle the visibility of other items in the same group, as well as
    top-level items. Otherwise toggling exclusive visibility of any item in
    a group is identical to toggling the parent's exclusive visibility,
    which is simply absurd.
    We still don't touch visibility of items in other groups.

 app/core/gimpitem-exclusive.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpitem-exclusive.c b/app/core/gimpitem-exclusive.c
index 1287005..72251c8 100644
--- a/app/core/gimpitem-exclusive.c
+++ b/app/core/gimpitem-exclusive.c
@@ -256,9 +256,11 @@ gimp_item_exclusive_get_lists (GimpItem     *item,
       if (other != item)
         {
           /* we are only interested in toplevel items that are not
-           * item's ancestor
+           * item's ancestor and same level items.
            */
-          if (! gimp_viewable_get_parent (GIMP_VIEWABLE (other)) &&
+          if ((! gimp_viewable_get_parent (GIMP_VIEWABLE (other)) ||
+               gimp_viewable_get_parent (GIMP_VIEWABLE (other)) ==
+               gimp_viewable_get_parent (GIMP_VIEWABLE (item))) &&
               ! gimp_viewable_is_ancestor (GIMP_VIEWABLE (other),
                                            GIMP_VIEWABLE (item)))
             {


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