diff options
Diffstat (limited to 'smtreeitem.cpp')
-rw-r--r-- | smtreeitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/smtreeitem.cpp b/smtreeitem.cpp index ab5e636..77a75d5 100644 --- a/smtreeitem.cpp +++ b/smtreeitem.cpp @@ -44,12 +44,12 @@ SmTreeItem *SmTreeItem::child(int row) const{ SmTreeItem *SmTreeItem::next() const{ int pos = row(); - if(pos + 1 < parent()->childCount()){ - return parent()->child(pos + 1); - } if(parent() == 0){ return 0; } + if(pos + 1 < parent()->childCount()){ + return parent()->child(pos + 1); + } return parent()->next(); } |