mapeditor.cpp
changeset 494 eea7fa702968
parent 491 c58b3973337c
child 497 ab118b86bc54
     1.1 --- a/mapeditor.cpp	Thu May 17 20:19:07 2007 +0000
     1.2 +++ b/mapeditor.cpp	Mon May 21 13:05:25 2007 +0000
     1.3 @@ -1306,7 +1306,11 @@
     1.4  		reader.setContentHandler( &handler );
     1.5  		reader.setErrorHandler( &handler );
     1.6  		handler.setMapEditor( this );
     1.7 -		handler.setTmpDir (filePath.left(filePath.findRev("/",-1)));	// needed to load files with rel. path
     1.8 +
     1.9 +
    1.10 +		// We need to set the tmpDir in order  to load files with rel. path
    1.11 +		QString tmpdir= fname.left(fname.findRev("/",-1));	
    1.12 +		handler.setTmpDir (tmpdir);
    1.13  		handler.setInputFile (file.name());
    1.14  		handler.setLoadMode (lmode);
    1.15  		bool ok = reader.parse( source );
    1.16 @@ -1610,7 +1614,7 @@
    1.17  	if (sel)
    1.18  	{
    1.19  		// write to directory
    1.20 -		QString saveFile=saveToDir (fileDir,clipboardFile+"-",true,QPointF(),sel ); // FIXME check FIO
    1.21 +		QString saveFile=saveToDir (clipboardDir,clipboardFile+"-",true,QPointF(),sel ); // FIXME check FIO
    1.22  		QFile file;
    1.23  
    1.24  		file.setName ( clipboardDir + "/"+clipboardFile);