mapeditor.cpp
changeset 742 54d44ecd6097
parent 741 1b4d1ea6ea8c
child 746 ee6b0f3a4c2f
     1.1 --- a/mapeditor.cpp	Fri Mar 06 15:02:58 2009 +0000
     1.2 +++ b/mapeditor.cpp	Thu Mar 19 11:45:28 2009 +0000
     1.3 @@ -128,10 +128,11 @@
     1.4  
     1.5  MapEditor::~MapEditor()
     1.6  {
     1.7 -	//cout <<"Destructor MapEditor\n";
     1.8 -	// tmpMapDir is in tmpVymDir, so it gets removed automagically when vym closes
     1.9 +	cout <<"Destructor MapEditor for "<<model->getMapName().toStdString()<<endl;
    1.10 +	// No need to remove tmp files:
    1.11 +	// tmpMapDir is in tmpVymDir, 
    1.12 +	// so it gets removed automagically when vym closes
    1.13  	
    1.14 -	//removeDir(QDir(tmpMapDir));	// FIXME check?!?
    1.15  	model->unregisterEditor(this);
    1.16  }
    1.17  
    1.18 @@ -413,21 +414,21 @@
    1.19  		if (model->getSelectedBranch() ) 
    1.20  		{
    1.21  			// Context Menu on branch or mapcenter
    1.22 -			model->updateActions();
    1.23 +			//FIXME model->updateActions(); needed?
    1.24  			branchContextMenu->popup(e->globalPos() );
    1.25  		} else
    1.26  		{
    1.27  			if (model->getSelectedFloatImage() )
    1.28  			{
    1.29  				// Context Menu on floatimage
    1.30 -				model->updateActions();
    1.31 +				// model->updateActions(); FIXME needed?
    1.32  				floatimageContextMenu->popup(e->globalPos() );
    1.33  			}	
    1.34  		}	
    1.35  	} else 
    1.36  	{ // No MapObj found, we are on the Canvas itself
    1.37  		// Context Menu on scene
    1.38 -		model->updateActions();
    1.39 +		// model->updateActions(); FIXME needed?
    1.40  		
    1.41  		// Open context menu synchronously to position new mapcenter
    1.42  		model->setContextPos (p);
    1.43 @@ -602,7 +603,7 @@
    1.44  			// a button in the toolbar)
    1.45  			if (e->button() == Qt::MidButton )
    1.46  				model->toggleScroll();
    1.47 -		model->updateActions();
    1.48 +		// model->updateActions(); FIXME needed?
    1.49  		// FIXME needed? xelection.update();
    1.50  	} else 
    1.51  	{ // No MapObj found, we are on the scene itself
    1.52 @@ -946,13 +947,13 @@
    1.53  					model->reposition();
    1.54  			}
    1.55  		}
    1.56 -		 model->updateSelection();
    1.57 +		model->updateSelection();  //FIXME needed? at least not after pos of selection has changed...
    1.58  		// Finally resize scene, if needed
    1.59  		scene()->update();
    1.60  		movingObj=NULL;		
    1.61  
    1.62  		// Just make sure, that actions are still ok,e.g. the move branch up/down buttons...
    1.63 -		model->updateActions();
    1.64 +		// model->updateActions(); FIXME neeeded? 
    1.65  	} else 
    1.66  		// maybe we moved View: set old cursor
    1.67  		setCursor (Qt::ArrowCursor);