Skip to content
Permalink
Browse files

Merge branch 'worlfile-ext'

  • Loading branch information
alexbruy committed May 26, 2016
2 parents 322da8b + ed90055 commit eb275ea49b5144e16143dd497ca81f6d62294ed9
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/qgsmapcanvas.cpp
@@ -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
{

0 comments on commit eb275ea

Please sign in to comment.
You can’t perform that action at this time.