We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent f3acfda commit c8a05c1Copy full SHA for c8a05c1
src/core/raster/qgsrasterlayer.cpp
@@ -1847,6 +1847,19 @@ void QgsRasterLayer::setDataProvider( QString const & provider )
1847
setDrawingStyle( SingleBandGray ); //sensible default
1848
}
1849
1850
+ // Auto set alpha band
1851
+ for ( int bandNo = 1; bandNo <= mDataProvider->bandCount(); bandNo++ )
1852
+ {
1853
+ if ( mDataProvider->colorInterpretation( bandNo ) == QgsRasterDataProvider::AlphaBand )
1854
1855
+ if ( mPipe.renderer() )
1856
1857
+ mPipe.renderer()->setAlphaBand( bandNo );
1858
+ }
1859
+ break;
1860
1861
1862
+
1863
//resampler (must be after renderer)
1864
QgsRasterResampleFilter * resampleFilter = new QgsRasterResampleFilter();
1865
mPipe.set( resampleFilter );
0 commit comments