actions: Use layer for lock check when mask is active
Resolves #9287 In GIMP 2.10, before checking if the drawable was locked, we checked if it was a layer mask and switched to its layer if so. This is because the lock status is saved in the layer. In GIMP 3.0, we accidentally moved that check to the bottom during the conversion to multi-select. As a result, when switching to a layer mask, the lock content and lock position would always be turned off since we checked the wrong drawable. This patch restores the 2.10 order of checks so that we compare the lock status with the layer and not the mask.
This commit is contained in:
parent
80f9caf418
commit
ea61460c6f
1 changed files with 23 additions and 23 deletions
|
|
@ -174,34 +174,34 @@ drawable_actions_update (GimpActionGroup *group,
|
|||
{
|
||||
GimpItem *item;
|
||||
|
||||
if (gimp_item_get_visible (iter->data))
|
||||
has_visible = TRUE;
|
||||
|
||||
if (gimp_item_can_lock_content (iter->data))
|
||||
{
|
||||
if (! gimp_item_get_lock_content (iter->data))
|
||||
locked = FALSE;
|
||||
can_lock = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_item_can_lock_position (iter->data))
|
||||
{
|
||||
if (! gimp_item_get_lock_position (iter->data))
|
||||
locked_pos = FALSE;
|
||||
can_lock_pos = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (iter->data)))
|
||||
none_children = FALSE;
|
||||
|
||||
if (! gimp_drawable_is_rgb (iter->data))
|
||||
all_rgb = FALSE;
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (iter->data))
|
||||
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (iter->data)));
|
||||
else
|
||||
item = GIMP_ITEM (iter->data);
|
||||
|
||||
if (gimp_item_get_visible (item))
|
||||
has_visible = TRUE;
|
||||
|
||||
if (gimp_item_can_lock_content (item))
|
||||
{
|
||||
if (! gimp_item_get_lock_content (item))
|
||||
locked = FALSE;
|
||||
can_lock = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_item_can_lock_position (item))
|
||||
{
|
||||
if (! gimp_item_get_lock_position (item))
|
||||
locked_pos = FALSE;
|
||||
can_lock_pos = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
|
||||
none_children = FALSE;
|
||||
|
||||
if (! gimp_drawable_is_rgb (iter->data))
|
||||
all_rgb = FALSE;
|
||||
|
||||
if (gimp_item_is_content_locked (item, NULL))
|
||||
all_writable = FALSE;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue