[Fix] resedit: Bugfix in __create_treSystems

This commit is contained in:
Allanis 2013-04-13 21:29:28 +01:00
parent 740386f7a5
commit 1f0796919c
2 changed files with 9 additions and 3 deletions

View File

@ -87,6 +87,7 @@ class space:
def __create_treSystems(self):
# Populate the tree.
wgt = self.__swidget("treSystems")
self.tree_systems = gtk.TreeStore(str)
for system in self.systems: # Load the planets.
treenode = self.tree_systems.append(None, [system])
@ -94,10 +95,12 @@ class space:
self.tree_systems.append(treenode, [planet])
col = gtk.TreeViewColumn('Systems')
cell = gtk.CellRendererText()
self.__swidget("treSystems").append_column(col)
if wgt.get_column(0):
wgt.remove_column(wgt.get_column(0))
wgt.append_column(col)
col.pack_start(cell, True)
col.add_attribute(cell, 'text', 0)
self.__swidget("treSystems").set_model(self.tree_systems)
wgt.set_model(self.tree_systems)
def __swidget(self,wgtname):
"""
@ -397,7 +400,10 @@ class space:
def debug(self):
print "SYSTEMS LOADED:"
print self.systems
print
for name, sys in self.systems.items():
print "SYSTEM: %s" % name
print sys
print
print
print "PLANETS LOADED:"

Binary file not shown.