diff -r 2a33304714ba -r f9f7922989d8 mapeditor.cpp --- a/mapeditor.cpp Tue Nov 17 08:24:59 2009 +0000 +++ b/mapeditor.cpp Wed Nov 25 10:58:21 2009 +0000 @@ -998,11 +998,11 @@ void MapEditor::mousePressEvent(QMouseEvent* e) { -cout << "ME::mousePressed\n"; +//cout << "ME::mousePressed\n"; //FIXME-3 // Ignore right clicks, these will go to context menus if (e->button() == Qt::RightButton ) { - cout << " ME::ignoring right mouse event...\n"; + //cout << " ME::ignoring right mouse event...\n"; e->ignore(); return; } @@ -1010,7 +1010,7 @@ //Ignore clicks while editing heading if (model->isSelectionBlocked() ) { - cout << " ME::ignoring other mouse event...\n"; + //cout << " ME::ignoring other mouse event...\n"; e->ignore(); return; } @@ -1622,6 +1622,8 @@ QList treeItemsNew; QList treeItemsOld; + QModelIndex newIndex; + bool do_reposition=false; QModelIndex ix; @@ -1670,6 +1672,8 @@ QModelIndex ix=newsel.indexes().first(); if (ix.isValid() ) { + newIndex=ix; + // Temporary unscroll if necessary TreeItem *ti= static_cast(ix.internalPointer()); if (ti->isBranchLikeType() ) @@ -1686,7 +1690,6 @@ ((MapItem*)ti)->getLMO()->updateVisibility(); } } - // FIXME-3 cout << "ME::updateSel doRepos="<reposition(); // Reduce rectangles