mirror of
https://github.com/wassname/sloth.git
synced 2026-07-08 16:48:44 +08:00
Allow get{Previous,Next}Sibling() to step more than one sibling.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user