[glom] Combo: Handle -1 DataModel column counts.



commit 9f211f4a28ce45dd40170e3ef59b9f6ecad876dd
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 29 14:05:31 2016 +0200

    Combo: Handle -1 DataModel column counts.

 glom/mode_data/datawidget/combo.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index 602a341..f21c787 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -104,7 +104,7 @@ void ComboGlom::set_choices_fixed(const Formatting::type_list_values& list_value
     return;
   }
   
-  guint columns_count = model->get_n_columns();
+  int columns_count = model->get_n_columns();
   if(columns_count)
     columns_count -= 1; //The last one is the just the extra text-equivalent of the first one, for 
GtkComboBox with has-entry=true, or for translations.
 
@@ -113,7 +113,7 @@ void ComboGlom::set_choices_fixed(const Formatting::type_list_values& list_value
 
   //For fixed (custom) choices, this will always be 1 column anyway,
   //so the for() loop here is excessive.
-  for(guint i = 0; i < columns_count; ++i)
+  for(auto i = 0; i < columns_count; ++i)
   {
     //set_entry_text_column() adds its own CellRenderer,
     //which we cannot replace without confusing (and crashing) GtkComboBox.


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