Deselect all other selected items when clicking a selected one

When clicking on an GtkIconView item inside a selection, deselect
all other selected items. (#506862)
This commit is contained in:
Claudio Saavedra 2009-04-18 18:47:07 +03:00
parent cf68d7f1d5
commit a982cea9ce

View File

@ -2144,14 +2144,11 @@ gtk_icon_view_button_press (GtkWidget *widget,
}
else
{
if (!item->selected)
{
gtk_icon_view_unselect_all_internal (icon_view);
item->selected = TRUE;
gtk_icon_view_queue_draw_item (icon_view, item);
dirty = TRUE;
}
gtk_icon_view_unselect_all_internal (icon_view);
item->selected = TRUE;
gtk_icon_view_queue_draw_item (icon_view, item);
dirty = TRUE;
}
gtk_icon_view_set_cursor_item (icon_view, item, cursor_cell);
icon_view->priv->anchor_item = item;