1.1 --- a/mapeditor.cpp Wed Feb 15 12:54:55 2006 +0000
1.2 +++ b/mapeditor.cpp Wed Feb 15 12:54:55 2006 +0000
1.3 @@ -717,7 +717,7 @@
1.4
1.5 void MapEditor::setFilePath(QString fname, QString destname)
1.6 {
1.7 - if (fname.isEmpty())
1.8 + if (fname.isEmpty() || fname=="")
1.9 {
1.10 filePath="";
1.11 fileName="";
1.12 @@ -761,12 +761,12 @@
1.13 return destPath;
1.14 }
1.15
1.16 -int MapEditor::load (QString fname, LoadMode lmode)
1.17 +ErrorCode MapEditor::load (QString fname, LoadMode lmode)
1.18 {
1.19 // Finish open lineEdits
1.20 if (lineedit) finishedLineEditNoSave();
1.21
1.22 - int returnCode=0;
1.23 + ErrorCode err=success;
1.24
1.25 if (lmode==NewMap)
1.26 {
1.27 @@ -790,7 +790,7 @@
1.28 {
1.29 QMessageBox::critical( 0, tr( "Critical Parse Error" ),
1.30 tr("Couldn't open map " +fname)+".");
1.31 - returnCode=1;
1.32 + err=aborted;
1.33 } else
1.34 {
1.35 blockReposition=true;
1.36 @@ -826,7 +826,7 @@
1.37 }
1.38 }
1.39 updateActions();
1.40 - return returnCode;
1.41 + return err;
1.42 }
1.43
1.44 int MapEditor::save (const SaveMode &savemode)
1.45 @@ -1065,9 +1065,9 @@
1.46 ExportBase ex;
1.47 ex.setMapCenter(mapCenter);
1.48
1.49 - QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export (ASCII)"));
1.50 + QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export as ASCII"));
1.51 fd->addFilter ("TXT (*.txt)");
1.52 - fd->setCaption(__VYM " -" +tr("Export (ASCII) (still experimental)"));
1.53 + fd->setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)"));
1.54 fd->setMode( QFileDialog::AnyFile );
1.55 fd->show();
1.56
1.57 @@ -1104,9 +1104,9 @@
1.58 void MapEditor::exportLaTeX()
1.59 {
1.60 // TODO still experimental
1.61 - QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export (LaTex)"));
1.62 + QFileDialog *fd=new QFileDialog( this, __VYM " - " +tr("Export as LaTeX"));
1.63 fd->addFilter ("TEX (*.tex)");
1.64 - fd->setCaption(__VYM " - " + tr("Export (LaTex) (still experimental)"));
1.65 + fd->setCaption(__VYM " - " + tr("Export as LaTeX")+" "+tr("(still experimental)"));
1.66 fd->setMode( QFileDialog::AnyFile );
1.67 fd->show();
1.68
1.69 @@ -3017,10 +3017,13 @@
1.70 void MapEditor::testFunction()
1.71 {
1.72 cout << "MapEditor::testFunction() called\n";
1.73 +
1.74 + /*
1.75 if (selection && (typeid(*selection) == typeid(BranchObj)))
1.76 {
1.77 cout << "Note:\n"<<((BranchObj*)selection)->getNoteOpenDoc()<<endl;
1.78 }
1.79 + */
1.80 }
1.81
1.82 void MapEditor::ensureSelectionVisible()