mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
actions: move top and bottom item check code
This commit is contained in:
@@ -302,13 +302,13 @@ channels_actions_update (GimpActionGroup *group,
|
||||
|
||||
list = g_list_find (channel_list, iter->data);
|
||||
|
||||
if (gimp_item_get_index (list->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (list->data) == n_channels - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (list)
|
||||
{
|
||||
if (gimp_item_get_index (list->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (list->data) == n_channels - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (g_list_previous (list))
|
||||
have_prev = TRUE;
|
||||
if (g_list_next (list))
|
||||
|
@@ -837,15 +837,15 @@ layers_actions_update (GimpActionGroup *group,
|
||||
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
|
||||
iter2 = g_list_find (layer_list, iter->data);
|
||||
|
||||
if (gimp_item_get_index (iter2->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (iter2->data) == n_layers - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (iter2)
|
||||
{
|
||||
GList *next_visible;
|
||||
|
||||
if (gimp_item_get_index (iter2->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (iter2->data) == n_layers - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (g_list_previous (iter2))
|
||||
have_prev = TRUE;
|
||||
|
||||
|
@@ -377,13 +377,13 @@ vectors_actions_update (GimpActionGroup *group,
|
||||
vectors_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
|
||||
iter2 = g_list_find (vectors_list, iter->data);
|
||||
|
||||
if (gimp_item_get_index (iter2->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (iter2->data) == n_paths - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (iter2)
|
||||
{
|
||||
if (gimp_item_get_index (iter2->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (iter2->data) == n_paths - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (g_list_previous (iter2))
|
||||
have_prev = TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user