1.1 --- a/vymmodel.cpp Fri Nov 27 15:00:51 2009 +0000
1.2 +++ b/vymmodel.cpp Tue Dec 01 11:06:15 2009 +0000
1.3 @@ -237,7 +237,7 @@
1.4 // Build xml recursivly
1.5 if (!saveSel)
1.6 // Save all mapcenters as complete map, if saveSel not set
1.7 - s+=saveTreeToDir(tmpdir,prefix,writeflags,offset);
1.8 + s+=saveTreeToDir(tmpdir,prefix,offset);
1.9 else
1.10 {
1.11 switch (saveSel->getType())
1.12 @@ -276,7 +276,7 @@
1.13 return s;
1.14 }
1.15
1.16 -QString VymModel::saveTreeToDir (const QString &tmpdir,const QString &prefix, int verbose, const QPointF &offset) // FIXME-4 verbose not needed (used to write icons)
1.17 +QString VymModel::saveTreeToDir (const QString &tmpdir,const QString &prefix, const QPointF &offset)
1.18 {
1.19 QString s;
1.20
1.21 @@ -2028,11 +2028,18 @@
1.22 for (int i=0; i<selbi->branchCount();++i)
1.23 selbi->getBranchNum(i)->getBranchObj()->setRelPos();
1.24
1.25 - //QString oldsel=getSelectString();
1.26 + QString oldsel=getSelectString();
1.27 + int n=selbi->num();
1.28 + QPointF p;
1.29 + BranchObj *bo=selbi->getBranchObj();
1.30 + if (bo) p=bo->getAbsPos();
1.31 + QString parsel=getSelectString(selbi->parent());
1.32 if ( relinkBranch (selbi,rootItem,-1) )
1.33 saveState (
1.34 - selbi,QString("relink()"), //FIXME-1 add paramters when detaching
1.35 - selbi,"detach ()",
1.36 + getSelectString (selbi),
1.37 + QString("relinkTo (\"%1\",%2,%3,%4)").arg(parsel).arg(n).arg(p.x()).arg(p.y()),
1.38 + oldsel,
1.39 + "detach ()",
1.40 QString("Detach %1").arg(getObjectName(selbi))
1.41 );
1.42 }