Skip to content
Permalink
Browse files

Apply loop improvement from Arunmozhi also to raster calc dialog

  • Loading branch information
mhugent committed Jan 30, 2012
1 parent 1b8a100 commit a201ae92d4a358a0192ea813751d5c2a347b3b5a
Showing with 2 additions and 21 deletions.
  1. +2 −21 src/app/qgsrastercalcdialog.cpp
@@ -155,27 +155,8 @@ void QgsRasterCalcDialog::insertAvailableOutputFormats()

//store the driver shortnames and the corresponding extensions
//(just in case the user does not give an extension for the output file name)
int index = 0;
while (( driverMetadata ) && driverMetadata[index] != 0 )
{
QStringList metadataTokens = QString( driverMetadata[index] ).split( "=", QString::SkipEmptyParts );
if ( metadataTokens.size() < 1 )
{
break;
}

if ( metadataTokens[0] == "DMD_EXTENSION" )
{
if ( metadataTokens.size() < 2 )
{
++index;
continue;
}
mDriverExtensionMap.insert( QString( GDALGetDriverShortName( driver ) ), metadataTokens[1] );
break;
}
++index;
}
QString driverExtension = GDALGetMetadataItem( driver, GDAL_DMD_EXTENSION, NULL );
mDriverExtensionMap.insert( QString( GDALGetDriverShortName( driver ) ), driverExtension );
}
}
}

0 comments on commit a201ae9

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