1.1 --- a/mainwindow.cpp Wed May 13 08:26:27 2009 +0000
1.2 +++ b/mainwindow.cpp Thu May 14 12:42:58 2009 +0000
1.3 @@ -3364,7 +3364,7 @@
1.4
1.5 void Main::changeSelection (VymModel *model, const QItemSelection &newsel, const QItemSelection &oldsel)
1.6 {
1.7 - //branchPropertyWindow->setModel (model ); //FIXME-2 this used to be called from BranchObj::select()
1.8 + //branchPropertyWindow->setModel (model ); //FIXME-2 this used to be called from BranchObj::select(). Maybe use signal now...
1.9
1.10 if (model && model==currentModel() )
1.11 {
1.12 @@ -3373,33 +3373,32 @@
1.13 if (!oldsel.indexes().isEmpty() )
1.14 {
1.15 ti=model->getItem(oldsel.indexes().first());
1.16 - //cout << "Main::changeSel getting note from "<<ti->getHeading().toStdString()<<": \""<<ti->getNote().toStdString()<<"\""<<endl;
1.17 - ti->setNoteObj (textEditor->getNoteObj(),false );
1.18 +
1.19 + // Don't update note if both treeItem and textEditor are empty
1.20 + //if (! (ti->hasEmptyNote() && textEditor->isEmpty() ))
1.21 + // ti->setNoteObj (textEditor->getNoteObj(),false );
1.22 }
1.23 if (!newsel.indexes().isEmpty() )
1.24 {
1.25 ti=model->getItem(newsel.indexes().first());
1.26 - if (!ti->getNoteObj().isEmpty() )
1.27 - {
1.28 - //cout << "Main::changeSel setting note of "<<ti->getHeading().toStdString()<<" m=("<<ti->getModel()<<") to \""<<ti->getNote().toStdString()<<"\""<<endl;
1.29 + if (!ti->hasEmptyNote() )
1.30 textEditor->setNote(ti->getNoteObj() );
1.31 - } else
1.32 - textEditor->setNote(NoteObj() );
1.33 + else
1.34 + textEditor->setNote(NoteObj() ); //FIXME-4 maybe add a clear() to TE
1.35 } else
1.36 textEditor->setInactive();
1.37
1.38 - // Show URL and link in statusbar // FIXME-2
1.39 - /*
1.40 + // Show URL and link in statusbar
1.41 QString status;
1.42 QString s=model->getURL();
1.43 if (!s.isEmpty() ) status+="URL: "+s+" ";
1.44 s=model->getVymLink();
1.45 if (!s.isEmpty() ) status+="Link: "+s;
1.46 if (!status.isEmpty() ) statusMessage (status);
1.47 -*/
1.48 -
1.49 - // Update Toolbar // FIXME-0, was so far in BranchObj
1.50 - //updateFlagsToolbar();
1.51 +
1.52 + // Update Toolbar
1.53 + //updateFlagsToolbar(); // FIXME-0, was so far in BranchObj
1.54 +
1.55
1.56 updateActions();
1.57 }