From 85375223bfb0982e44b4a538fab103246f27ecd6 Mon Sep 17 00:00:00 2001 From: Markus Roth Date: Sun, 11 Mar 2012 18:44:48 -0700 Subject: [PATCH] Allow get{Previous,Next}Sibling() to step more than one sibling. --- sloth/annotations/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sloth/annotations/model.py b/sloth/annotations/model.py index 0aadaad..71112a0 100644 --- a/sloth/annotations/model.py +++ b/sloth/annotations/model.py @@ -93,11 +93,11 @@ class ModelItem: self._ensureLoaded(pos) return self._children[pos] - def getPreviousSibling(self): - return self.getSibling(self._row-1) + def getPreviousSibling(self, step=1): + return self.getSibling(self._row-step) - def getNextSibling(self): - return self.getSibling(self._row+1) + def getNextSibling(self, step=1): + return self.getSibling(self._row+step) def getSibling(self, row): if self._parent is not None: