1.1 --- a/branchitem.cpp Tue Apr 28 20:53:44 2009 +0000
1.2 +++ b/branchitem.cpp Wed Apr 29 18:46:31 2009 +0000
1.3 @@ -13,6 +13,7 @@
1.4
1.5 scrolled=false;
1.6 tmpUnscrolled=false;
1.7 + type=Branch;
1.8 }
1.9
1.10 BranchItem::~BranchItem()
1.11 @@ -44,15 +45,16 @@
1.12 branchCounter++;
1.13 }
1.14
1.15 -QString BranchItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset)
1.16 +QString BranchItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset) //FIXME-1
1.17 {
1.18 + cout << "BI::saveToDir: "<<getHeadingStd()<<endl;
1.19 // Cloudy stuff can be hidden during exports
1.20 if (hidden) return QString();
1.21
1.22 QString s,a;
1.23 BranchObj *bo=(BranchObj*)lmo;
1.24
1.25 - /* FIXME-1
1.26 + /*
1.27 // Update of note is usually done while unselecting a branch
1.28 if (isNoteInEditor) getNoteFromTextEditor();
1.29
1.30 @@ -114,10 +116,14 @@
1.31 s+=note.saveToDir();
1.32
1.33 // Save branches
1.34 - TreeItem *ti=getFirstBranch();
1.35 - TreeItem *last=getLastBranch();
1.36 - while (ti && ti!=last)
1.37 - s+=ti->saveToDir(tmpdir,prefix,offset);
1.38 + int i=0;
1.39 + TreeItem *ti=getBranchNum(i);
1.40 + while (ti)
1.41 + {
1.42 + s+=getBranchNum(i)->saveToDir(tmpdir,prefix,offset);
1.43 + i++;
1.44 + ti=getBranchNum(i);
1.45 + }
1.46
1.47 /*
1.48 // Save XLinks
1.49 @@ -334,10 +340,12 @@
1.50 {
1.51 // Initialize BranchObj, order of things is important...
1.52 BranchObj* newbo=new BranchObj(scene);
1.53 + lmo=newbo;
1.54 newbo->setParObj(parent()->getLMO() );
1.55 newbo->setTreeItem (this);
1.56 newbo->setDefAttr(BranchObj::NewBranch);
1.57
1.58 + initLMO();
1.59
1.60 if (!getHeading().isEmpty() )
1.61 {
1.62 @@ -348,7 +356,6 @@
1.63
1.64 //newbo->updateLink(); //FIXME-3
1.65
1.66 - lmo=newbo;
1.67 return newbo;
1.68 }
1.69