1.1 --- a/branchobj.cpp Fri Dec 29 13:52:19 2006 +0000
1.2 +++ b/branchobj.cpp Fri Jan 05 11:17:32 2007 +0000
1.3 @@ -232,7 +232,7 @@
1.4 }
1.5
1.6 // updateLink is called implicitly in move
1.7 - requestReposition(); // FIXME shouldn't be this a request?
1.8 + requestReposition();
1.9 }
1.10
1.11 void BranchObj::unsetParObjTmp()
1.12 @@ -370,11 +370,11 @@
1.13 LinkableMapObj::setLinkColor ();
1.14 }
1.15
1.16 -void BranchObj::setColorChilds (QColor col)
1.17 +void BranchObj::setColorSubtree(QColor col)
1.18 {
1.19 OrnamentedObj::setColor (col);
1.20 for (int i=0; i<branch.size(); ++i)
1.21 - branch.at(i)->setColorChilds(col);
1.22 + branch.at(i)->setColorSubtree(col);
1.23 }
1.24
1.25 BranchObj* BranchObj::first()
1.26 @@ -452,7 +452,6 @@
1.27 if (itLast==branch.at(i))
1.28 {
1.29 // ok, we come from my own childs
1.30 - //xyz //FIXME need to proceed to NEXT child or up again
1.31 if (i<branch.size()-1)
1.32 bo=branch.at(i+1);
1.33 else
1.34 @@ -732,8 +731,12 @@
1.35
1.36 QString BranchObj::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset)
1.37 {
1.38 + // Cloudy stuff can be hidden during exports
1.39 if (hidden) return "";
1.40
1.41 + // Update of note is usually done while unselecting a branch
1.42 + if (isNoteInEditor) getNoteFromTextEditor();
1.43 +
1.44 QString s,a;
1.45 QString scrolledAttr;
1.46 if (scrolled)
1.47 @@ -1123,8 +1126,13 @@
1.48
1.49 BranchObj* BranchObj::getLastSelectedBranch ()
1.50 {
1.51 - if (lastSelectedBranch>=0 && branch.size()>0)
1.52 - return branch.at(lastSelectedBranch);
1.53 + if (lastSelectedBranch>=0)
1.54 + {
1.55 + if ( branch.size()>lastSelectedBranch)
1.56 + return branch.at(lastSelectedBranch);
1.57 + if (branch.size()>0)
1.58 + return branch.last();
1.59 + }
1.60 return NULL;
1.61 }
1.62
1.63 @@ -1335,7 +1343,6 @@
1.64 calcBBoxSizeWithChilds();
1.65 updateLink(); // This update is needed if the scene is resized
1.66 // due to excessive moving of a FIO
1.67 - // FIXME really needed? reposition is also called from updateLink...
1.68
1.69 alignRelativeTo ( QPointF (absPos.x(),
1.70 absPos.y()-(bboxTotal.height()-bbox.height())/2) );
1.71 @@ -1453,6 +1460,7 @@
1.72 else
1.73 textEditor->setFilenameHint(getHeading() );
1.74 textEditor->setFontHint (note.getFontHint() );
1.75 + isNoteInEditor=true;
1.76
1.77 LinkableMapObj::select();
1.78 // Tell parent that I am selected now:
1.79 @@ -1482,10 +1490,9 @@
1.80 // Delete any messages like vymLink in StatusBar
1.81 mainWindow->statusMessage ("");
1.82
1.83 - // save note from editor and set flag
1.84 - // text is done by updateNoteFlag(), just save
1.85 - // filename here
1.86 - note.setFilenameHint (textEditor->getFilename());
1.87 + // Save current note
1.88 + if (isNoteInEditor) getNoteFromTextEditor();
1.89 + isNoteInEditor=false;
1.90
1.91 // reset temporary unscroll, if we have scrolled parents somewhere
1.92 if (parObj) ((BranchObj*)(parObj))->resetTmpUnscroll();