summaryrefslogtreecommitdiff
path: root/portato/gui/qt/tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/qt/tree.py')
-rw-r--r--portato/gui/qt/tree.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/portato/gui/qt/tree.py b/portato/gui/qt/tree.py
index a8c3e66..6e9950f 100644
--- a/portato/gui/qt/tree.py
+++ b/portato/gui/qt/tree.py
@@ -70,7 +70,12 @@ class QtTree (Tree):
def next_iter (self, it):
iter = Qt.QTreeWidgetItemIterator(it)
iter += 1 # next iter ...
- return iter.value()
+
+ newIt = iter.value()
+ if newIt.parent() != it.parent(): # stop if we left the current parent
+ return None
+ else:
+ return newIt
def get_value (self, it, column):
return str(it.text(column))