6123: Index into undohistory, correct fail on older gobject

svn: r20860
This commit is contained in:
Benny Malengier
2012-12-28 13:01:49 +00:00
parent 5fb66f3918
commit 91abba9d20

View File

@@ -121,7 +121,7 @@ class UndoHistory(ManagedWindow):
(model, node) = self.selection.get_selected() (model, node) = self.selection.get_selected()
if not node or len(self.model) == 1: if not node or len(self.model) == 1:
return return
path = self.model.get_path(node) path = self.model.get_path(node).get_indices()
start = min(path[0], self.undodb.undo_count) start = min(path[0], self.undodb.undo_count)
end = max(path[0], self.undodb.undo_count) end = max(path[0], self.undodb.undo_count)
@@ -158,7 +158,7 @@ class UndoHistory(ManagedWindow):
(model, node) = self.selection.get_selected() (model, node) = self.selection.get_selected()
if not node: if not node:
return return
path = self.model.get_path(node) path = self.model.get_path(node).get_indices()
nsteps = path[0] - self.undodb.undo_count - 1 nsteps = path[0] - self.undodb.undo_count - 1
self._move(nsteps or -1) self._move(nsteps or -1)
@@ -167,7 +167,7 @@ class UndoHistory(ManagedWindow):
(model, node) = self.selection.get_selected() (model, node) = self.selection.get_selected()
if not node: if not node:
return return
path = self.model.get_path(node) path = self.model.get_path(node).get_indices()
nsteps = path[0] - self.undodb.undo_count nsteps = path[0] - self.undodb.undo_count
self._move(nsteps or 1) self._move(nsteps or 1)