actions: move top and bottom item check code
This commit is contained in:
parent
c47b1d67d1
commit
6b611a4802
3 changed files with 15 additions and 15 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue