From 5ed04055f1d86a9f8293bf8440169607be56bc12 Mon Sep 17 00:00:00 2001 From: Shubham Date: Mon, 17 Jul 2023 22:59:08 +0530 Subject: [PATCH] app: check for lock_position of layer when editing its mask The lock in the layers tab only sets lock for the actual layer and not for its mask, so also check the lock on the actual layer and not just on the mask when editing layer mask. --- app/paint/gimppaintcore.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c index e9e8650410..5426e963ed 100644 --- a/app/paint/gimppaintcore.c +++ b/app/paint/gimppaintcore.c @@ -840,6 +840,11 @@ gimp_paint_core_expand_drawable (GimpPaintCore *core, if (gimp_item_get_lock_position (GIMP_ITEM (drawable))) return FALSE; + /* If editing a layer mask, also check position lock for parent layer */ + if (GIMP_IS_LAYER_MASK (drawable)) + if (gimp_item_get_lock_position (GIMP_ITEM (GIMP_LAYER_MASK (drawable)->layer))) + return FALSE; + if (!gimp_paint_core_get_show_all (core) && outside_image) return FALSE;