diff -r 382a444f5b0c -r a6931cd6309a vymmodel.cpp --- a/vymmodel.cpp Thu May 14 12:42:58 2009 +0000 +++ b/vymmodel.cpp Fri May 15 15:22:15 2009 +0000 @@ -238,7 +238,6 @@ // TODO constr. of FIO creates lots of objects, better do this in some other way... FloatImageObj (mapScene).resetSaveCounter();// FIXME-2 this can be done local to vymmodel maybe... - cout << "VM::saveToDir 0 " <getType()==TreeItem::MapCenter) // Save all mapcenters as complete map, if saveSel not set @@ -2211,7 +2210,6 @@ { if (branch && dst) { - cout << "VM::relinkBranch "<getHeadingStd()<<" to "<getHeadingStd()<<" at "<parent(); // Remove at current position @@ -4603,11 +4601,16 @@ bool VymModel::select (TreeItem *ti) { - if (ti) + if (ti) return select (index(ti)); + return false; +} + +bool VymModel::select (const QModelIndex &index) +{ + if (index.isValid() ) { - QModelIndex ix=index(ti); - selModel->select (ix,QItemSelectionModel::ClearAndSelect ); - ti->setLastSelectedBranch(); + selModel->select (index,QItemSelectionModel::ClearAndSelect ); + getSelectedItem()->setLastSelectedBranch(); return true; } return false;