Bug fixes

svn: r20767
This commit is contained in:
Nick Hall 2012-12-05 12:32:34 +00:00
parent c2092a71bd
commit 64f67aa204
3 changed files with 5 additions and 5 deletions

View File

@ -253,7 +253,7 @@ class EditPlace(EditPrimary):
with DbTxn(_('Add location'), self.dbstate.db) as trans:
for loc_type, name in new_locations:
new_location = Location()
new_location.parent = handle
new_location.parent = str(handle)
new_location.name = name
new_location.set_type(loc_type)
handle = self.dbstate.db.add_location(new_location, trans)

View File

@ -119,7 +119,7 @@ class UndoHistory(ManagedWindow):
def _selection_changed(self, obj):
(model, node) = self.selection.get_selected()
if not node:
if not node or len(self.model) == 1:
return
path = self.model.get_path(node)
start = min(path[0], self.undodb.undo_count)

View File

@ -153,16 +153,16 @@ class LocationBaseModel(object):
return "%012x" % data[6]
def column_change(self, data):
return Utils.format_time(data[6])
return format_time(data[6])
def column_place_name(self, data):
return unicode(data[2])
def sort_place_change(self, data):
return "%012x" % data[9]
return "%012x" % data[6]
def column_place_change(self, data):
return Utils.format_time(data[9])
return Utils.format_time(data[6])
#-------------------------------------------------------------------------
#