[libgda] GdauiRawGrid: avoid infinite recursing



commit 805f5405a36ee3c91582f7bdffdd75ab40cd630e
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Sep 14 21:41:36 2009 +0200

    GdauiRawGrid: avoid infinite recursing

 libgda-ui/gdaui-raw-grid.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 1a0f16d..5eedbec 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -2324,8 +2324,14 @@ tree_view_selection_changed_cb (GtkTreeSelection *selection, GdauiRawGrid *grid)
 			/* selection changing is refused, return to the current selected row */
 			GtkTreePath *path;
 			path = gtk_tree_path_new_from_indices (gda_data_model_iter_get_row (grid->priv->iter), -1);
+			g_signal_handlers_block_by_func (G_OBJECT (selection),
+							 G_CALLBACK (tree_view_selection_changed_cb), grid);
+
 			gtk_tree_selection_unselect_all (selection);
 			gtk_tree_selection_select_path (selection, path);
+			g_signal_handlers_unblock_by_func (G_OBJECT (selection),
+							   G_CALLBACK (tree_view_selection_changed_cb), grid);
+
 			gtk_tree_path_free (path);
 		}
 		row_selected = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]