Additional check if save works release-1-12-maintained
authorinsilmaril
Thu, 05 Mar 2009 09:33:30 +0000
branchrelease-1-12-maintained
changeset 5889dd2219982f
parent 57 d045ba89798e
child 59 1c550f80c43b
Additional check if save works
demos/lifeforms.vym
mapeditor.cpp
version.h
     1.1 Binary file demos/lifeforms.vym has changed
     2.1 --- a/mapeditor.cpp	Wed Feb 25 12:44:10 2009 +0000
     2.2 +++ b/mapeditor.cpp	Thu Mar 05 09:33:30 2009 +0000
     2.3 @@ -326,10 +326,13 @@
     2.4  	{
     2.5  		if ( typeid(*saveSel) == typeid(BranchObj) )
     2.6  			// Save Subtree
     2.7 -			s+=((BranchObj*)(saveSel))->saveToDir(tmpdir,prefix,offset);
     2.8 -		else if ( typeid(*saveSel) == typeid(FloatImageObj) )
     2.9 -			// Save image
    2.10 -			s+=((FloatImageObj*)(saveSel))->saveToDir(tmpdir,prefix);
    2.11 +			s+=((BranchObj*)saveSel)->saveToDir(tmpdir,prefix,offset);
    2.12 +		else 
    2.13 +		{
    2.14 +			if ( typeid(*saveSel) == typeid(FloatImageObj) )
    2.15 +				// Save image
    2.16 +				s+=((FloatImageObj*)saveSel)->saveToDir(tmpdir,prefix);
    2.17 +		}	
    2.18  	}
    2.19  
    2.20  	// Save local settings
    2.21 @@ -1842,10 +1845,13 @@
    2.22  		// TODO take care of multiselections
    2.23  	}	
    2.24  
    2.25 +	// FIXME trying to debug save problem
    2.26 +	if (saveFile.length()<1000)
    2.27 +		QMessageBox::critical (0,"Critical error in MapEditor::save",QString("saveFile is too small:\n%1").arg(saveFile));
    2.28  	if (!saveStringToDisk(fileDir+mapFileName,saveFile))
    2.29  	{
    2.30  		err=aborted;
    2.31 -		qWarning ("ME::saveStringToDisk failed!");
    2.32 +		QMessageBox::critical (0,"Critical error in MapEditor::save",QString("could not sage %1").arg(fileDir+mapFileName));
    2.33  	}
    2.34  
    2.35  	if (zipped)
    2.36 @@ -5294,7 +5300,6 @@
    2.37  		else
    2.38  			if (debug)
    2.39  				cout <<"  ME::autosave  rejected, file on disk is newer than last save.\n"; 
    2.40 -
    2.41  	}	
    2.42  }
    2.43  
     3.1 --- a/version.h	Wed Feb 25 12:44:10 2009 +0000
     3.2 +++ b/version.h	Thu Mar 05 09:33:30 2009 +0000
     3.3 @@ -5,9 +5,9 @@
     3.4  
     3.5  #define __VYM_NAME "VYM"
     3.6  #define __VYM_VERSION "1.12.2d"
     3.7 -#define __VYM_CODENAME "Maintenance Update "
     3.8 -//#define __VYM_CODENAME "Codename: development version"
     3.9 -#define __VYM_BUILD_DATE "2009-02-25"
    3.10 +//#define __VYM_CODENAME "Maintenance Update "
    3.11 +#define __VYM_CODENAME "Codename: development version"
    3.12 +#define __VYM_BUILD_DATE "2009-03-04"
    3.13  
    3.14  
    3.15  bool checkVersion(const QString &);