diff -r 9ff332964015 -r ff3b01ce0960 treemodel.cpp --- a/treemodel.cpp Wed Apr 01 15:06:57 2009 +0000 +++ b/treemodel.cpp Thu Apr 02 09:46:29 2009 +0000 @@ -3,6 +3,7 @@ #include using namespace std; +#include "branchitem.h" #include "treeitem.h" #include "treemodel.h" @@ -108,11 +109,11 @@ return rootItem->columnCount(); } -TreeItem* TreeModel::next(TreeItem* ¤t, TreeItem* &previous, int &d0) +BranchItem* TreeModel::next(BranchItem* ¤t, BranchItem* &previous, int &d0) { // Walk through map beginning at current with previous==0 // Start at root, if current==NULL - if (!current) current=rootItem; + if (!current) current=(BranchItem*)rootItem; // Are we just beginning to walk the map? if (!previous) @@ -143,7 +144,7 @@ // Coming from below, // Trying to go down again to siblings - TreeItem *sibling=current->getBranchNum (previous->num()+1); + BranchItem *sibling=current->getBranchNum (previous->num()+1); if (sibling) { @@ -155,7 +156,7 @@ // Go up and try to find siblings of current previous=current; - current=current->parent(); + current=(BranchItem*)current->parent(); // Check if we still can go somewhere if (!current) return current;