diff -r 9079931da6c3 -r 087e60400acc branchobj.cpp --- a/branchobj.cpp Wed Jul 27 18:56:32 2005 +0000 +++ b/branchobj.cpp Wed Jul 27 18:56:35 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; } }