mapeditor.cpp
branchrelease-1-12-maintained
changeset 59 1c550f80c43b
parent 58 89dd2219982f
child 60 50c2fb829193
     1.1 --- a/mapeditor.cpp	Thu Mar 05 09:33:30 2009 +0000
     1.2 +++ b/mapeditor.cpp	Tue Mar 10 11:27:17 2009 +0000
     1.3 @@ -185,9 +185,9 @@
     1.4  
     1.5  MapEditor::~MapEditor()
     1.6  {
     1.7 -	//cout <<"Destructor MapEditor\n";
     1.8 -	autosaveTimer->stop();
     1.9 +	//cout <<"Destructor MapEditor "<<mapName.toStdString()<<endl;
    1.10  	fileChangedTimer->stop();
    1.11 +	clear();
    1.12  
    1.13  	// tmpMapDir is in tmpVymDir, so it gets removed automagically when vym closes
    1.14  	
    1.15 @@ -1847,7 +1847,7 @@
    1.16  
    1.17  	// FIXME trying to debug save problem
    1.18  	if (saveFile.length()<1000)
    1.19 -		QMessageBox::critical (0,"Critical error in MapEditor::save",QString("saveFile is too small:\n%1").arg(saveFile));
    1.20 +		QMessageBox::critical (0,"Critical error in MapEditor::save",QString("saveFile is too small, try make a backup NOW\nof your original file\nbefore vym writes to\"%1\":\n%2").arg(mapName).arg(saveFile));
    1.21  	if (!saveStringToDisk(fileDir+mapFileName,saveFile))
    1.22  	{
    1.23  		err=aborted;
    1.24 @@ -2169,7 +2169,9 @@
    1.25  
    1.26  void MapEditor::clear()
    1.27  {
    1.28 -	xelection.unselect();
    1.29 +	//cout << "ME::clear() "<<mapName.toStdString()<<endl;
    1.30 +	xelection.clear();
    1.31 +	autosaveTimer->stop();
    1.32  	model->clear();
    1.33  }
    1.34