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.
This commit is contained in:
Shubham 2023-07-17 22:59:08 +05:30 committed by Jehan
parent 5b8f410342
commit 5ed04055f1
1 changed files with 5 additions and 0 deletions

View File

@ -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;