[orca] Don't attach the model to the tree until after it has been populated



commit 7b567fd8acc82dd0cb8788f671ae0aaa4cb2e447
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Feb 4 19:55:08 2013 -0500

    Don't attach the model to the tree until after it has been populated

 src/orca/orca_gui_navlist.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/orca_gui_navlist.py b/src/orca/orca_gui_navlist.py
index bdb50f9..f19ee01 100644
--- a/src/orca/orca_gui_navlist.py
+++ b/src/orca/orca_gui_navlist.py
@@ -62,7 +62,6 @@ class OrcaNavListGUI:
         cols = [GObject.TYPE_OBJECT]
         cols.extend(len(columnHeaders) * [GObject.TYPE_STRING])
         model = Gtk.ListStore(*cols)
-        self._tree.set_model(model)
 
         cell = Gtk.CellRendererText()
         column = Gtk.TreeViewColumn("Accessible", cell, text=0)
@@ -75,12 +74,13 @@ class OrcaNavListGUI:
             column.set_sort_column_id(i+1)
             self._tree.append_column(column)
 
-        model = self._tree.get_model()
         for row in rows:
             rowIter = model.append(None)
             for i, cell in enumerate(row):
                 model.set_value(rowIter, i, cell)
 
+        self._tree.set_model(model)
+
         btn = dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
         btn.connect('clicked', self._onCancelClicked)
 



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