1.1 --- a/mapeditor.cpp Wed Feb 25 12:44:10 2009 +0000
1.2 +++ b/mapeditor.cpp Thu Mar 05 09:33:30 2009 +0000
1.3 @@ -326,10 +326,13 @@
1.4 {
1.5 if ( typeid(*saveSel) == typeid(BranchObj) )
1.6 // Save Subtree
1.7 - s+=((BranchObj*)(saveSel))->saveToDir(tmpdir,prefix,offset);
1.8 - else if ( typeid(*saveSel) == typeid(FloatImageObj) )
1.9 - // Save image
1.10 - s+=((FloatImageObj*)(saveSel))->saveToDir(tmpdir,prefix);
1.11 + s+=((BranchObj*)saveSel)->saveToDir(tmpdir,prefix,offset);
1.12 + else
1.13 + {
1.14 + if ( typeid(*saveSel) == typeid(FloatImageObj) )
1.15 + // Save image
1.16 + s+=((FloatImageObj*)saveSel)->saveToDir(tmpdir,prefix);
1.17 + }
1.18 }
1.19
1.20 // Save local settings
1.21 @@ -1842,10 +1845,13 @@
1.22 // TODO take care of multiselections
1.23 }
1.24
1.25 + // FIXME trying to debug save problem
1.26 + if (saveFile.length()<1000)
1.27 + QMessageBox::critical (0,"Critical error in MapEditor::save",QString("saveFile is too small:\n%1").arg(saveFile));
1.28 if (!saveStringToDisk(fileDir+mapFileName,saveFile))
1.29 {
1.30 err=aborted;
1.31 - qWarning ("ME::saveStringToDisk failed!");
1.32 + QMessageBox::critical (0,"Critical error in MapEditor::save",QString("could not sage %1").arg(fileDir+mapFileName));
1.33 }
1.34
1.35 if (zipped)
1.36 @@ -5294,7 +5300,6 @@
1.37 else
1.38 if (debug)
1.39 cout <<" ME::autosave rejected, file on disk is newer than last save.\n";
1.40 -
1.41 }
1.42 }
1.43