[glom/glom-1-14] Don't allow deleting placeholder rows.



commit 82c4f9685921df57ab1497396edd6985897fecda
Author: Daniel Borgmann <danielb openismus com>
Date:   Wed May 12 10:43:22 2010 +0100

    Don't allow deleting placeholder rows.
    
    * glom/utility_widgets/db_adddel/db_adddel.cc: Don't allow deleting a
    placeholder row (which leads to broken behaviour).

 ChangeLog                                   |    7 +++++++
 glom/utility_widgets/db_adddel/db_adddel.cc |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b6d0ec1..d919b0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-12 Daniel Borgmann <danielb openismus com>
+
+	Don't allow deleting placeholder rows.
+
+	* glom/utility_widgets/db_adddel/db_adddel.cc: Don't allow deleting a
+	placeholder row (which leads to broken behaviour).
+
 2010-05-14  Daniel Borgmann  <danielb openismus com>
 
 	Fix position of "Records / Found" labels.
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index 574e604..fe895c3 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -215,7 +215,7 @@ void DbAddDel::on_MenuPopup_activate_Delete()
   if(refSelection)
   {
     Gtk::TreeModel::iterator iter = refSelection->get_selected();
-    if(iter)
+    if(iter && !get_is_placeholder_row(iter))
     {
       //TODO: We can't handle multiple-selections yet.
       user_requested_delete(iter, iter);



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