1.1 --- a/mapeditor.cpp Wed Jun 20 11:58:47 2007 +0000
1.2 +++ b/mapeditor.cpp Wed Jun 20 11:58:47 2007 +0000
1.3 @@ -719,6 +719,21 @@
1.4 exportXHTML (fname,false);
1.5 }
1.6 /////////////////////////////////////////////////////////////////////
1.7 + } else if (com=="exportXML")
1.8 + {
1.9 + QString fname="";
1.10 + ok=true;
1.11 + if (parser.parCount()>=2)
1.12 + // Hey, we even have a filename
1.13 + fname=parser.parString(ok,1);
1.14 + if (!ok)
1.15 + {
1.16 + parser.setError (Aborted,"Could not read filename");
1.17 + } else
1.18 + {
1.19 + exportXML (fname,false);
1.20 + }
1.21 + /////////////////////////////////////////////////////////////////////
1.22 } else if (com=="importDir")
1.23 {
1.24 if (xelection.isEmpty())
1.25 @@ -1800,6 +1815,7 @@
1.26 dia.setFilePath (filePath );
1.27 dia.setMapName (mapName );
1.28 dia.readSettings();
1.29 + if (dir!="") dia.setDir (dir);
1.30
1.31 bool ok=true;
1.32
1.33 @@ -1829,14 +1845,21 @@
1.34
1.35 if (ok)
1.36 {
1.37 - exportXML (dia.getDir() );
1.38 + exportXML (dia.getDir(),false );
1.39 dia.doExport(mapName );
1.40 //if (dia.hasChanged()) setChanged();
1.41 }
1.42 }
1.43
1.44 -void MapEditor::exportXML(const QString &dir)
1.45 +void MapEditor::exportXML(QString dir, bool askForName)
1.46 {
1.47 + if (askForName)
1.48 + {
1.49 + dir=browseDirectory(this,tr("Export XML to directory"));
1.50 + if (dir =="" && !reallyWriteDirectory(dir) )
1.51 + return;
1.52 + }
1.53 +
1.54 // Hide stuff during export, if settings want this
1.55 setExportMode (true);
1.56
1.57 @@ -4020,9 +4043,6 @@
1.58
1.59 void MapEditor::testFunction()
1.60 {
1.61 - mainWindow->statusMessage("Biiiiiiiiiiiiiiing!");
1.62 - return;
1.63 -
1.64 BranchObj *bo=xelection.getBranch();
1.65 if (bo) animObjList.append( bo );
1.66