diff -r 6d2b32f305f9 -r 382a444f5b0c mainwindow.cpp --- a/mainwindow.cpp Wed May 13 08:26:27 2009 +0000 +++ b/mainwindow.cpp Thu May 14 12:42:58 2009 +0000 @@ -3364,7 +3364,7 @@ void Main::changeSelection (VymModel *model, const QItemSelection &newsel, const QItemSelection &oldsel) { - //branchPropertyWindow->setModel (model ); //FIXME-2 this used to be called from BranchObj::select() + //branchPropertyWindow->setModel (model ); //FIXME-2 this used to be called from BranchObj::select(). Maybe use signal now... if (model && model==currentModel() ) { @@ -3373,33 +3373,32 @@ if (!oldsel.indexes().isEmpty() ) { ti=model->getItem(oldsel.indexes().first()); - //cout << "Main::changeSel getting note from "<getHeading().toStdString()<<": \""<getNote().toStdString()<<"\""<setNoteObj (textEditor->getNoteObj(),false ); + + // Don't update note if both treeItem and textEditor are empty + //if (! (ti->hasEmptyNote() && textEditor->isEmpty() )) + // ti->setNoteObj (textEditor->getNoteObj(),false ); } if (!newsel.indexes().isEmpty() ) { ti=model->getItem(newsel.indexes().first()); - if (!ti->getNoteObj().isEmpty() ) - { - //cout << "Main::changeSel setting note of "<getHeading().toStdString()<<" m=("<getModel()<<") to \""<getNote().toStdString()<<"\""<hasEmptyNote() ) textEditor->setNote(ti->getNoteObj() ); - } else - textEditor->setNote(NoteObj() ); + else + textEditor->setNote(NoteObj() ); //FIXME-4 maybe add a clear() to TE } else textEditor->setInactive(); - // Show URL and link in statusbar // FIXME-2 - /* + // Show URL and link in statusbar QString status; QString s=model->getURL(); if (!s.isEmpty() ) status+="URL: "+s+" "; s=model->getVymLink(); if (!s.isEmpty() ) status+="Link: "+s; if (!status.isEmpty() ) statusMessage (status); -*/ - - // Update Toolbar // FIXME-0, was so far in BranchObj - //updateFlagsToolbar(); + + // Update Toolbar + //updateFlagsToolbar(); // FIXME-0, was so far in BranchObj + updateActions(); }