diff -r a4df85cb3fe9 -r eacf1b165d2d mapeditor.cpp --- a/mapeditor.cpp Wed Jun 20 11:58:47 2007 +0000 +++ b/mapeditor.cpp Wed Jun 20 11:58:47 2007 +0000 @@ -719,6 +719,21 @@ exportXHTML (fname,false); } ///////////////////////////////////////////////////////////////////// + } else if (com=="exportXML") + { + QString fname=""; + ok=true; + if (parser.parCount()>=2) + // Hey, we even have a filename + fname=parser.parString(ok,1); + if (!ok) + { + parser.setError (Aborted,"Could not read filename"); + } else + { + exportXML (fname,false); + } + ///////////////////////////////////////////////////////////////////// } else if (com=="importDir") { if (xelection.isEmpty()) @@ -1800,6 +1815,7 @@ dia.setFilePath (filePath ); dia.setMapName (mapName ); dia.readSettings(); + if (dir!="") dia.setDir (dir); bool ok=true; @@ -1829,14 +1845,21 @@ if (ok) { - exportXML (dia.getDir() ); + exportXML (dia.getDir(),false ); dia.doExport(mapName ); //if (dia.hasChanged()) setChanged(); } } -void MapEditor::exportXML(const QString &dir) +void MapEditor::exportXML(QString dir, bool askForName) { + if (askForName) + { + dir=browseDirectory(this,tr("Export XML to directory")); + if (dir =="" && !reallyWriteDirectory(dir) ) + return; + } + // Hide stuff during export, if settings want this setExportMode (true); @@ -4020,9 +4043,6 @@ void MapEditor::testFunction() { - mainWindow->statusMessage("Biiiiiiiiiiiiiiing!"); - return; - BranchObj *bo=xelection.getBranch(); if (bo) animObjList.append( bo );