Skip to content
Permalink
Browse files

project file transform: don't imply we know the band count (fixes #7080

…, fixes #8283)
  • Loading branch information
jef-n committed Jul 13, 2013
1 parent 603cd59 commit d6c16dd2caab603e7ee7c38750157fff1fd7b6d5
Showing with 5 additions and 8 deletions.
  1. +1 −2 src/core/qgsmaplayer.cpp
  2. +4 −6 src/core/qgsprojectfiletransform.cpp
@@ -155,7 +155,6 @@ bool QgsMapLayer::draw( QgsRenderContext& rendererContext )
void QgsMapLayer::drawLabels( QgsRenderContext& rendererContext )
{
Q_UNUSED( rendererContext );
// QgsDebugMsg("entered.");
}

bool QgsMapLayer::readLayerXML( const QDomElement& layerElement )
@@ -411,7 +410,7 @@ bool QgsMapLayer::readLayerXML( const QDomElement& layerElement )
readCustomProperties( layerElement );

return true;
} // void QgsMapLayer::readXML
} // bool QgsMapLayer::readLayerXML


bool QgsMapLayer::readXml( const QDomNode& layer_node )
@@ -816,13 +816,11 @@ int QgsProjectFileTransform::rasterBandNumber( const QDomElement& rasterProperti
QDomElement rasterBandElem = rasterPropertiesElem.firstChildElement( bandName );
if ( !rasterBandElem.isNull() )
{
for ( int i = 1; i <= rlayer->bandCount(); i++ )
QRegExp re( "(\\d+)" );

if ( re.indexIn( rasterBandElem.text() ) >= 0 )
{
if ( rlayer->bandName( i ) == rasterBandElem.text() )
{
band = i;
break;
}
return re.cap(1).toInt();
}
}
return band;

0 comments on commit d6c16dd

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