diff -r 657078664946 -r 30c4a6c7ff10 mapeditor.cpp --- a/mapeditor.cpp Wed Feb 15 12:54:55 2006 +0000 +++ b/mapeditor.cpp Wed Feb 15 12:54:55 2006 +0000 @@ -717,7 +717,7 @@ void MapEditor::setFilePath(QString fname, QString destname) { - if (fname.isEmpty()) + if (fname.isEmpty() || fname=="") { filePath=""; fileName=""; @@ -761,12 +761,12 @@ return destPath; } -int MapEditor::load (QString fname, LoadMode lmode) +ErrorCode MapEditor::load (QString fname, LoadMode lmode) { // Finish open lineEdits if (lineedit) finishedLineEditNoSave(); - int returnCode=0; + ErrorCode err=success; if (lmode==NewMap) { @@ -790,7 +790,7 @@ { QMessageBox::critical( 0, tr( "Critical Parse Error" ), tr("Couldn't open map " +fname)+"."); - returnCode=1; + err=aborted; } else { blockReposition=true; @@ -826,7 +826,7 @@ } } updateActions(); - return returnCode; + return err; } int MapEditor::save (const SaveMode &savemode) @@ -1065,9 +1065,9 @@ ExportBase ex; ex.setMapCenter(mapCenter); - QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export (ASCII)")); + QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export as ASCII")); fd->addFilter ("TXT (*.txt)"); - fd->setCaption(__VYM " -" +tr("Export (ASCII) (still experimental)")); + fd->setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)")); fd->setMode( QFileDialog::AnyFile ); fd->show(); @@ -1104,9 +1104,9 @@ void MapEditor::exportLaTeX() { // TODO still experimental - QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export (LaTex)")); + QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export as LaTeX")); fd->addFilter ("TEX (*.tex)"); - fd->setCaption(__VYM " - " + tr("Export (LaTex) (still experimental)")); + fd->setCaption(__VYM " - " + tr("Export as LaTeX")+" "+tr("(still experimental)")); fd->setMode( QFileDialog::AnyFile ); fd->show(); @@ -3017,10 +3017,13 @@ void MapEditor::testFunction() { cout << "MapEditor::testFunction() called\n"; + + /* if (selection && (typeid(*selection) == typeid(BranchObj))) { cout << "Note:\n"<<((BranchObj*)selection)->getNoteOpenDoc()<