mapeditor.cpp
changeset 807 f9f7922989d8
parent 805 fc7a93ff97c3
child 810 a9295db4dcbf
     1.1 --- a/mapeditor.cpp	Tue Nov 17 08:24:59 2009 +0000
     1.2 +++ b/mapeditor.cpp	Wed Nov 25 10:58:21 2009 +0000
     1.3 @@ -998,11 +998,11 @@
     1.4  
     1.5  void MapEditor::mousePressEvent(QMouseEvent* e)
     1.6  {
     1.7 -cout << "ME::mousePressed\n";
     1.8 +//cout << "ME::mousePressed\n"; //FIXME-3
     1.9  	// Ignore right clicks, these will go to context menus
    1.10  	if (e->button() == Qt::RightButton )
    1.11  	{
    1.12 -		cout << "  ME::ignoring right mouse event...\n";
    1.13 +		//cout << "  ME::ignoring right mouse event...\n";
    1.14  		e->ignore();
    1.15  		return;
    1.16  	}
    1.17 @@ -1010,7 +1010,7 @@
    1.18  	//Ignore clicks while editing heading
    1.19  	if (model->isSelectionBlocked() ) 
    1.20  	{
    1.21 -		cout << "  ME::ignoring other mouse event...\n";
    1.22 +		//cout << "  ME::ignoring other mouse event...\n";
    1.23  		e->ignore();
    1.24  		return;
    1.25  	}
    1.26 @@ -1622,6 +1622,8 @@
    1.27  	QList <TreeItem*> treeItemsNew;
    1.28  	QList <TreeItem*> treeItemsOld;
    1.29  
    1.30 +	QModelIndex newIndex;
    1.31 +
    1.32  	bool do_reposition=false;
    1.33  
    1.34  	QModelIndex ix;
    1.35 @@ -1670,6 +1672,8 @@
    1.36  		QModelIndex ix=newsel.indexes().first(); 
    1.37  		if (ix.isValid() )
    1.38  		{
    1.39 +			newIndex=ix;
    1.40 +
    1.41  			// Temporary unscroll if necessary
    1.42  			TreeItem *ti= static_cast<TreeItem*>(ix.internalPointer());
    1.43  			if (ti->isBranchLikeType() )
    1.44 @@ -1686,7 +1690,6 @@
    1.45  				((MapItem*)ti)->getLMO()->updateVisibility();
    1.46  		}
    1.47  	}
    1.48 -	// FIXME-3 cout << "ME::updateSel  doRepos="<<do_reposition<<endl;
    1.49  	if (do_reposition) model->reposition();
    1.50  
    1.51  	// Reduce rectangles