[libgda] Correctly select the current row after row deleted in UI Form



commit 1894dab24746d88ea68dd96bbcee9c3f54a55344
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Jan 29 20:50:40 2010 +0100

    Correctly select the current row after row deleted in UI Form

 libgda-ui/gdaui-raw-form.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index 38b7cc4..2d3c550 100644
--- a/libgda-ui/gdaui-raw-form.c
+++ b/libgda-ui/gdaui-raw-form.c
@@ -738,7 +738,8 @@ action_commit_cb (GtkAction *action, GdauiRawForm *form)
 		g_error_free (error);
 	}
 
-	iter_row_changed_cb (form->priv->iter, gda_data_model_iter_get_row (form->priv->iter), form);
+	/* get to a correct selected row */
+	for (; !gda_data_model_iter_move_to_row (form->priv->iter, row) && (row >= 0); row--);
 }
 
 static void



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