diff -r ed5b407975b3 -r a8a5c7288f57 branchitem.cpp --- a/branchitem.cpp Thu Apr 23 12:15:31 2009 +0000 +++ b/branchitem.cpp Mon Apr 27 12:07:15 2009 +0000 @@ -17,8 +17,12 @@ BranchItem::~BranchItem() { - cout << "Destr. BranchItem\n"; - qDeleteAll(childItems); +// cout << "Destr. BranchItem "<tmpUnscrolled; } +void BranchItem::insertBranch (int pos, BranchItem *branch) +{ + if (pos<0) pos=0; + if (pos>branchCounter) pos=branchCounter; + childItems.insert(pos+branchOffset,branch); + branch->parentItem=this; + branch->setModel (model); + + if (branchCounter==0) + branchOffset=childItems.count()-1; + branchCounter++; +} + QString BranchItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset) { // Cloudy stuff can be hidden during exports @@ -310,12 +327,11 @@ BranchObj* BranchItem::createMapObj(QGraphicsScene *scene) { // Initialize BranchObj, order of things is important... - cout << "BI::createMO scene="<setParObj(parent()->getLMO() ); newbo->setTreeItem (this); newbo->setDefAttr(BranchObj::NewBranch); - //newbo->updateLink(); + //newbo->updateLink(); //FIXME-3 lmo=newbo; return newbo;