1
1
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:
Cheesequake
2024-07-18 17:57:17 +00:00
committed by Alx Sa
parent c47b1d67d1
commit 6b611a4802
3 changed files with 15 additions and 15 deletions

View File

@@ -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))

View File

@@ -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;

View File

@@ -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;