1.1 --- a/branchobj.cpp Mon Apr 24 10:05:09 2006 +0000
1.2 +++ b/branchobj.cpp Mon May 08 13:25:48 2006 +0000
1.3 @@ -1128,6 +1128,15 @@
1.4 return branch.at(i);
1.5 }
1.6
1.7 +bool BranchObj::canMoveBranchUp()
1.8 +{
1.9 + if (!parObj) return false;
1.10 + BranchObj* par=(BranchObj*)parObj;
1.11 + if (this==par->getFirstBranch())
1.12 + return false;
1.13 + else
1.14 + return true;
1.15 +}
1.16
1.17 BranchObj* BranchObj::moveBranchUp(BranchObj* bo1) // move a branch up (modify myself)
1.18 {
1.19 @@ -1143,6 +1152,16 @@
1.20 return branch.at(i);
1.21 }
1.22
1.23 +bool BranchObj::canMoveBranchDown()
1.24 +{
1.25 + if (!parObj) return false;
1.26 + BranchObj* par=(BranchObj*)parObj;
1.27 + if (this==par->getLastBranch())
1.28 + return false;
1.29 + else
1.30 + return true;
1.31 +}
1.32 +
1.33 BranchObj* BranchObj::moveBranchDown(BranchObj* bo1)
1.34 {
1.35 savePosInAngle();