Skip to content

Commit

Permalink
load default style if provider is gdal and if no style was given
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennesky committed Apr 25, 2012
1 parent df87ee9 commit 66e3fcb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -155,6 +155,14 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
bool loadDefaultStyleFlag = false ; // ???
setDataProvider( providerKey, layers, styles, format, crs, loadDefaultStyleFlag );

// load default style if provider is gdal and if no style was given
// this should be an argument like in the other constructor
if ( mValid && providerKey == "gdal" && layers.isEmpty() && styles.isEmpty() )
{
bool defaultLoadedFlag = false;
loadDefaultStyle( defaultLoadedFlag );
}

// Default for the popup menu
// TODO: popMenu = 0;

Expand Down

0 comments on commit 66e3fcb

Please sign in to comment.