mirror of https://github.com/GNOME/gimp.git
Use gimp_item_get_container_iter() instead of the GimpImage iter APIs
Using the new function makes sure the sensitivity of the raise and lower actions corresponds to what is possible (raising and lowering within the group).
This commit is contained in:
parent
5f66faf953
commit
603d3441e7
|
@ -25,6 +25,7 @@
|
|||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
|
@ -168,9 +169,12 @@ channels_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (channel)
|
||||
{
|
||||
GList *channel_list;
|
||||
GList *list;
|
||||
|
||||
list = g_list_find (gimp_image_get_channel_iter (image), channel);
|
||||
channel_list = gimp_item_get_container_iter (GIMP_ITEM (channel));
|
||||
|
||||
list = g_list_find (channel_list, channel);
|
||||
|
||||
if (list)
|
||||
{
|
||||
|
|
|
@ -509,13 +509,16 @@ layers_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (layer)
|
||||
{
|
||||
GList *layer_list;
|
||||
GList *list;
|
||||
|
||||
mask = gimp_layer_get_mask (layer);
|
||||
lock_alpha = gimp_layer_get_lock_alpha (layer);
|
||||
alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
|
||||
|
||||
list = g_list_find (gimp_image_get_layer_iter (image), layer);
|
||||
layer_list = gimp_item_get_container_iter (GIMP_ITEM (layer));
|
||||
|
||||
list = g_list_find (layer_list, layer);
|
||||
|
||||
if (list)
|
||||
{
|
||||
|
|
|
@ -258,12 +258,15 @@ vectors_actions_update (GimpActionGroup *group,
|
|||
if (vectors)
|
||||
{
|
||||
GimpItem *item = GIMP_ITEM (vectors);
|
||||
GList *vectors_list;
|
||||
GList *list;
|
||||
|
||||
visible = gimp_item_get_visible (item);
|
||||
linked = gimp_item_get_linked (item);
|
||||
|
||||
list = g_list_find (gimp_image_get_vectors_iter (image), vectors);
|
||||
vectors_list = gimp_item_get_container_iter (item);
|
||||
|
||||
list = g_list_find (vectors_list, vectors);
|
||||
|
||||
if (list)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue