1.1 --- a/branchitem.cpp Wed Feb 10 13:48:42 2010 +0000
1.2 +++ b/branchitem.cpp Fri Feb 19 13:47:03 2010 +0000
1.3 @@ -299,28 +299,24 @@
1.4 do
1.5 {
1.6 madeChanges=false;
1.7 - if (inverse)
1.8 - for(curChildIndex=1;curChildIndex<childCount;curChildIndex++)
1.9 + for(curChildIndex=1;curChildIndex<childCount;curChildIndex++)
1.10 + {
1.11 + BranchItem* curChild =getBranchNum(curChildIndex);
1.12 + BranchItem* prevChild=getBranchNum(curChildIndex-1);
1.13 + if (inverse)
1.14 {
1.15 - BranchItem* curChild =getBranchNum(curChildIndex);
1.16 - BranchItem* prevChild=getBranchNum(curChildIndex-1);
1.17 if (prevChild->getHeading().compare(curChild->getHeading())<0)
1.18 {
1.19 model->moveUp (curChild);
1.20 madeChanges=true;
1.21 }
1.22 - }
1.23 - else
1.24 - for(curChildIndex=1;curChildIndex<childCount;curChildIndex++)
1.25 - {
1.26 - BranchItem* curChild =getBranchNum(curChildIndex);
1.27 - BranchItem* prevChild=getBranchNum(curChildIndex-1);
1.28 - if ( prevChild->getHeading().compare(curChild->getHeading())>0)
1.29 + } else
1.30 + if (prevChild->getHeading().compare(curChild->getHeading())>0)
1.31 {
1.32 - model->moveUp(curChild);
1.33 + model->moveUp (curChild);
1.34 madeChanges=true;
1.35 }
1.36 - }
1.37 + }
1.38 }while(madeChanges);
1.39 }
1.40