diff -r 9b9c7e8b9147 -r 3590c3490789 branchobj.cpp --- a/branchobj.cpp Tue Jul 19 14:44:30 2005 +0000 +++ b/branchobj.cpp Sun Jul 31 12:24:53 2005 +0000 @@ -661,17 +661,22 @@ return NULL; } +int BranchObj::getDefHeadingSize() +{ + if (depth==0) + return 16; + else + if (depth==1) + return 12; + else + return 10; +} + void BranchObj::setHeading(QString s) { // Adjusting font size QFont font=heading->getFont(); - if (depth==0) - font.setPointSize(16); - else - if (depth>1) - font.setPointSize(10); - else - font.setPointSize(12); + font.setPointSize(getDefHeadingSize() ); heading->setFont(font); heading->setText(s); // set new heading calcBBoxSize(); // recalculate bbox @@ -995,9 +1000,10 @@ // inserts its childs at the place of bo BranchObj *bo; bo=borem->getLastBranch(); + int pos=borem->getNum(); while (bo) { - bo->moveBranchTo (borem,1); + bo->moveBranchTo (this,pos+1); bo=borem->getLastBranch(); } removeBranch (borem); @@ -1107,10 +1113,13 @@ } else { // inserts me at pos in parent of dst - par=(BranchObj*)(dst->getParObj()); if (par) - return par->insertBranchPtr (this,pos); - else + { + BranchObj *bo=dst->insertBranchPtr (this,pos); + bo->setHeading (bo->getHeading()); + return bo; + + } else return NULL; } }