diff -r a8a98a94899a -r 7ddbe3fa34a1 mapeditor.cpp --- a/mapeditor.cpp Tue Nov 04 12:09:10 2008 +0000 +++ b/mapeditor.cpp Mon Dec 08 16:57:33 2008 +0000 @@ -538,8 +538,34 @@ if (lmo) { + cout << "ME::mouse pressed\n"; + cout << " lmo="<getTreeItem(); + cout << " lmo="<row()<<","<column()<<") = "<index( ti->row(), ti->column(), model->index (0,0,QModelIndex()) ); + QModelIndex ix=model->index(ti); + selModel->select (ix,QItemSelectionModel::ClearAndSelect ); + /* + if (selModel->hasSelection() ) + { + QModelIndex ixsel=selModel->selectedIndexes().first(); + TreeItem *tisel= static_cast(ixsel.internalPointer()); + ; + cout << " ti="<button() == Qt::LeftButton ) @@ -1044,6 +1070,7 @@ QGraphicsRectItem *sb; +/* // Check if selection is empty if (newsel.indexes().isEmpty() ) { @@ -1055,6 +1082,7 @@ if (selboxList.isEmpty()) { + sb = mapScene->addRect( QRectF(0,0,0,0), QPen(selectionColor), @@ -1064,12 +1092,21 @@ selboxList.append (sb); } else sb=selboxList.first(); - +*/ + if (newsel.isEmpty() ) + { + cout << " newsel=empty!\n"; + return; + } QModelIndex index=newsel.indexes().first(); // TODO no multiselections yet - TreeItem *item = static_cast(index.internalPointer()); - LinkableMapObj *lmo=item->getLMO(); + TreeItem *ti= static_cast(index.internalPointer()); + LinkableMapObj *lmo=ti->getLMO(); + cout << " newsel.count="<row()<<","<column()<<") = "<setPen (selectionColor); selboxList.first()->setBrush (selectionColor); } - +*/ +} +void MapEditor::updateCurrent (const QModelIndex &newsel,const QModelIndex &) +{ + cout << "ME::updateCurrent\n"; + +/* + + TreeItem *item = static_cast(newsel.internalPointer()); + LinkableMapObj *lmo=item->getLMO(); + cout << " lmo="<