Commit f96bd962 authored by Maurits Rijk's avatar Maurits Rijk Committed by Maurits Rijk

don't try do to anything when selection is empty. Fixes bug #149157.

2004-12-13  Maurits Rijk  <m.rijk@chello.nl>

	* plug-ins/imagemap/imap_selection.c: don't try do to anything when
	selection is empty. Fixes bug #149157.
parent eadf6f3c
2004-12-13 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/imagemap/imap_selection.c: don't try do to anything when
selection is empty. Fixes bug #149157.
2004-12-13 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/imagemap/imap_misc.[ch]
......
......@@ -67,8 +67,6 @@ changed_cb(GtkTreeSelection *selection, gpointer param)
{
Selection_t *data = (Selection_t*) param;
printf("changed_cb\n");
if (data->select_lock) {
data->select_lock = FALSE;
} else {
......@@ -78,12 +76,13 @@ changed_cb(GtkTreeSelection *selection, gpointer param)
GtkTreeModel *model;
Command_t *command;
gtk_tree_selection_get_selected (selection, &model, &iter);
gtk_tree_model_get (GTK_TREE_MODEL(data->store), &iter, 0, &obj, -1);
printf("%d %d\n", count, obj->selected);
if (count == 0)
return;
if (count == 1) {
gtk_tree_selection_get_selected (selection, &model, &iter);
gtk_tree_model_get (GTK_TREE_MODEL(data->store), &iter, 0, &obj, -1);
if (obj->selected) {
gtk_tree_selection_unselect_iter (selection, &iter);
command = unselect_command_new (obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment