[glom/glom-1-18] Fix small bugs in commented-out debugging print statements.



commit 5b54845ee85ffd878b0fcb5bd281ff0bad72a3f5
Author: Ben Konrath <ben bagu org>
Date:   Thu Oct 6 12:41:42 2011 +0200

    Fix small bugs in commented-out debugging print statements.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661009
    
    * glom/libglom/db_utils.cc: Change field to layout_item. Move print
    statement to be after the assignment to
    field_used_in_relationship_to_one.

 ChangeLog                |   10 ++++++++++
 glom/libglom/db_utils.cc |    4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d942b0c..0111edb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-10-06  Ben Konrath  <ben bagu org>
+
+	Fix small bugs in commented-out debugging print statements.
+
+	https://bugzilla.gnome.org/show_bug.cgi?id=661009
+
+	* glom/libglom/db_utils.cc: Change field to layout_item. Move print
+	statement to be after the assignment to
+	field_used_in_relationship_to_one.
+
 2011-09-28  Murray Cumming  <murrayc murrayc com>
 
 	Related Records: Fix bug with a blank row when there is only one row. 
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index 200c890..9eebf43 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -1830,8 +1830,8 @@ bool layout_field_should_have_navigation(const Glib::ustring& table_name, const
   //meaning it identifies a record in another table.
   sharedptr<const Relationship> const_relationship =
     document->get_field_used_in_relationship_to_one(table_name, layout_item);
-  //std::cout << "DEBUG: table_name=" << table_name << ", table_used=" << field->get_table_used(table_name) << ", field=" << field->get_name() << ", field_used_in_relationship_to_one=" << field_used_in_relationship_to_one << std::endl;
   field_used_in_relationship_to_one = sharedptr<Relationship>::cast_const(const_relationship); //This is just because we can't seem to have a sharedptr<const Relationship>& output parameter.
+  // std::cout << "DEBUG: table_name=" << table_name << ", table_used=" << layout_item->get_table_used(table_name) << ", layout_item=" << layout_item->get_name() << ", field_used_in_relationship_to_one=" << field_used_in_relationship_to_one << std::endl;
 
   //Check whether the field identifies a record in another table
   //just because it is a primary key in that table:
@@ -1839,7 +1839,7 @@ bool layout_field_should_have_navigation(const Glib::ustring& table_name, const
   const bool field_is_related_primary_key =
     layout_item->get_has_relationship_name() &&
     field_info && field_info->get_primary_key();
-  //std::cout <<   "DEBUG: field->get_has_relationship_name()=" << field->get_has_relationship_name() << ", field_info->get_primary_key()=" <<  field_info->get_primary_key() << ", field_is_related_primary_key=" << field_is_related_primary_key << std::endl;
+  // std::cout <<   "DEBUG: layout_item->get_has_relationship_name()=" << layout_item->get_has_relationship_name() << ", field_info->get_primary_key()=" <<  field_info->get_primary_key() << ", field_is_related_primary_key=" << field_is_related_primary_key << std::endl;
 
   return field_used_in_relationship_to_one || field_is_related_primary_key;
 }



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