mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Merge branch 'worlfile-ext'
This commit is contained in:
commit
eb275ea49b
@ -891,8 +891,10 @@ void QgsMapCanvas::saveAsImage( const QString& theFileName, QPixmap * theQPixmap
|
||||
//Origin Y (center of top left cell)
|
||||
myHeader += qgsDoubleToString( myRect.yMaximum() - ( mapUnitsPerPixel() / 2 ) ) + "\r\n";
|
||||
QFileInfo myInfo = QFileInfo( theFileName );
|
||||
// allow dotted names
|
||||
QString myWorldFileName = myInfo.absolutePath() + '/' + myInfo.completeBaseName() + '.' + theFormat + 'w';
|
||||
// build the world file name
|
||||
QString outputSuffix = myInfo.suffix();
|
||||
QString myWorldFileName = myInfo.absolutePath() + '/' + myInfo.baseName() + '.'
|
||||
+ outputSuffix.at( 0 ) + outputSuffix.at( myInfo.suffix().size() - 1 ) + 'w';
|
||||
QFile myWorldFile( myWorldFileName );
|
||||
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user