1.7.16 Small bugfixes
authorinsilmaril
Mon, 08 May 2006 13:25:46 +0000
changeset 31000ac7b2ac016
parent 309 1f41709aa387
child 311 6a7db028088e
1.7.16 Small bugfixes
branchobj.cpp
branchobj.h
     1.1 --- a/branchobj.cpp	Mon Apr 24 11:31:16 2006 +0000
     1.2 +++ b/branchobj.cpp	Mon May 08 13:25:46 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();
     2.1 --- a/branchobj.h	Mon Apr 24 11:31:16 2006 +0000
     2.2 +++ b/branchobj.h	Mon May 08 13:25:46 2006 +0000
     2.3 @@ -103,7 +103,9 @@
     2.4      virtual BranchObj* getFirstBranch();
     2.5      virtual BranchObj* getLastBranch();
     2.6  	virtual BranchObj* getBranchNum(const uint &);
     2.7 +    virtual bool canMoveBranchUp();
     2.8      virtual BranchObj* moveBranchUp(BranchObj*);
     2.9 +    virtual bool canMoveBranchDown();
    2.10      virtual BranchObj* moveBranchDown(BranchObj*);
    2.11      virtual BranchObj* moveBranchTo (BranchObj*, int);
    2.12      virtual void alignRelativeTo(const QPoint );