mainwindow.cpp
changeset 111 e42f9fdb281a
parent 105 67a91e28b30f
child 117 835f2eb4d744
     1.1 --- a/mainwindow.cpp	Mon Jun 06 20:27:42 2005 +0000
     1.2 +++ b/mainwindow.cpp	Fri Jul 08 07:24:42 2005 +0000
     1.3 @@ -967,7 +967,7 @@
     1.4  
     1.5      a = new QAction( tr( "Export as ASCII (still experimental)" ), QPixmap(), tr( "Export (ASCII)" ), 0, this, "exportASCII" );
     1.6      connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) );
     1.7 -	// FIXME deactivated, doesn't work with QRichtext anyway
     1.8 +	// TODO deactivated, doesn't work with QRichtext anyway
     1.9  	//   a->addTo( exportMenu );
    1.10  
    1.11  	a = new QAction( tr( "Export XML" ), QPixmap(), tr( "Export XML" ),  0, this, "exportXML" );
    1.12 @@ -1313,8 +1313,7 @@
    1.13  						{
    1.14  							for ( QStringList::Iterator it = flist.begin(); it != flist.end(); ++it ) 
    1.15  								*it=tmpMapDir + "/" + *it;
    1.16 -							// FIXME	
    1.17 -							// Multiple entries, load all (but only the first one into this ME)
    1.18 +							// FIXME Multiple entries, load all (but only the first one into this ME)
    1.19  							//mainWindow->fileLoadFromTmp (flist);
    1.20  							//returnCode=1;	// Silently forget this attempt to load
    1.21  							qWarning ("MainWindow::load (fn)  multimap found...");
    1.22 @@ -1333,11 +1332,19 @@
    1.23  			}
    1.24  		}
    1.25  
    1.26 +
    1.27 +		// Save existing filename
    1.28 +		QString fn_org=me->getFilePath();
    1.29 +
    1.30  		// Finally load map into mapEditor
    1.31  		me->setFilePath (mapfile,fn);
    1.32  		if (me->load(mapfile,lmode))
    1.33  			err=aborted;
    1.34  
    1.35 +		// Restore old (maybe empty) filepath, if this is an import
    1.36 +		if (lmode!=NewMap)
    1.37 +			me->setFilePath (fn_org);
    1.38 +			
    1.39  		// Delete tmpDir
    1.40  		system ( "rm -rf "+tmpMapDir);
    1.41