mirror of https://github.com/GNOME/gimp.git
Allow scaling of group layers even though they appear locked
This commit is contained in:
parent
bdf01c6495
commit
40cf6fa62a
|
@ -503,6 +503,7 @@ layers_actions_update (GimpActionGroup *group,
|
|||
gboolean can_lock_alpha = FALSE;
|
||||
gboolean text_layer = FALSE;
|
||||
gboolean writable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
GList *next = NULL;
|
||||
GList *next_visible = NULL;
|
||||
GList *prev = NULL;
|
||||
|
@ -527,6 +528,9 @@ layers_actions_update (GimpActionGroup *group,
|
|||
alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
|
||||
writable = ! gimp_item_get_lock_content (GIMP_ITEM (layer));
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))
|
||||
children = TRUE;
|
||||
|
||||
layer_list = gimp_item_get_container_iter (GIMP_ITEM (layer));
|
||||
|
||||
list = g_list_find (layer_list, layer);
|
||||
|
@ -591,7 +595,7 @@ layers_actions_update (GimpActionGroup *group,
|
|||
|
||||
SET_SENSITIVE ("layers-resize", writable && !ac);
|
||||
SET_SENSITIVE ("layers-resize-to-image", writable && !ac);
|
||||
SET_SENSITIVE ("layers-scale", writable && !ac);
|
||||
SET_SENSITIVE ("layers-scale", (writable || children) && !ac);
|
||||
|
||||
SET_SENSITIVE ("layers-crop", writable && sel);
|
||||
|
||||
|
|
|
@ -288,7 +288,10 @@ layer_scale_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), TRUE, error))
|
||||
/* group items are transformable even though they appear locked */
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), FALSE, error) &&
|
||||
(gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
|
||||
gimp_pdb_item_is_writable (GIMP_ITEM (layer), error)))
|
||||
{
|
||||
if (progress)
|
||||
gimp_progress_start (progress, _("Scaling"), FALSE);
|
||||
|
@ -333,7 +336,10 @@ layer_scale_full_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), TRUE, error))
|
||||
/* group items are transformable even though they appear locked */
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), FALSE, error) &&
|
||||
(gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
|
||||
gimp_pdb_item_is_writable (GIMP_ITEM (layer), error)))
|
||||
{
|
||||
if (progress)
|
||||
gimp_progress_start (progress, _("Scaling"), FALSE);
|
||||
|
|
|
@ -343,7 +343,10 @@ HELP
|
|||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), TRUE, error))
|
||||
/* group items are transformable even though they appear locked */
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), FALSE, error) &&
|
||||
(gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
|
||||
gimp_pdb_item_is_writable (GIMP_ITEM (layer), error)))
|
||||
{
|
||||
if (progress)
|
||||
gimp_progress_start (progress, _("Scaling"), FALSE);
|
||||
|
@ -394,7 +397,10 @@ HELP
|
|||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), TRUE, error))
|
||||
/* group items are transformable even though they appear locked */
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), FALSE, error) &&
|
||||
(gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
|
||||
gimp_pdb_item_is_writable (GIMP_ITEM (layer), error)))
|
||||
{
|
||||
if (progress)
|
||||
gimp_progress_start (progress, _("Scaling"), FALSE);
|
||||
|
|
Loading…
Reference in New Issue