1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Alx Sa
8d3147fbf2 widgets: Prevent locks from being removed when a mask is added
Currently, masks are set to editable when
clicked in the layer tree view. This may
not be desirable if the layer is pixel or
position locked, as those locks will be
automatically removed.
This patch adds a check to ensure the
layer is actually editable before setting
it to be so when clicked.
2024-07-20 18:11:08 +00:00

View File

@@ -1670,9 +1670,14 @@ gimp_layer_tree_view_mask_clicked (GimpCellRendererViewable *cell,
}
else if (! gimp_layer_get_edit_mask (layer))
{
/* Simple click selects the mask for edition. */
gboolean editable = TRUE;
editable = (! gimp_item_get_lock_content (GIMP_ITEM (layer)) &&
! gimp_item_get_lock_position (GIMP_ITEM (layer)));
/* Simple click selects the mask for editing if
* the layer is not locked. */
gimp_action_group_set_action_active (group, "layers-mask-edit",
TRUE);
editable);
}
g_object_unref (renderer);