Skip to content
Permalink
Browse files

Remove ancient disabled layer transparency code

  • Loading branch information
nyalldawson committed May 29, 2017
1 parent 32af831 commit 5aae97ec9f8e101148d29664b8580a834a9638cb
Showing with 0 additions and 40 deletions.
  1. +0 −40 src/core/qgsmaplayer.cpp
@@ -543,18 +543,6 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, const QgsReadWr
mMetadataUrlFormat = metaUrlElem.attribute( QStringLiteral( "format" ), QLatin1String( "" ) );
}

#if 0
//read transparency level
QDomNode transparencyNode = layer_node.namedItem( "transparencyLevelInt" );
if ( ! transparencyNode.isNull() )
{
// set transparency level only if it's in project
// (otherwise it sets the layer transparent)
QDomElement myElement = transparencyNode.toElement();
setTransparency( myElement.text().toInt() );
}
#endif

mMetadata.readFromLayer( this );

return true;
@@ -821,14 +809,6 @@ bool QgsMapLayer::writeLayerXml( QDomElement &layerElement, QDomDocument &docume
mCRS.writeXml( mySrsElement, document );
layerElement.appendChild( mySrsElement );

#if 0
// <transparencyLevelInt>
QDomElement transparencyLevelIntElement = document.createElement( "transparencyLevelInt" );
QDomText transparencyLevelIntText = document.createTextNode( QString::number( getTransparency() ) );
transparencyLevelIntElement.appendChild( transparencyLevelIntText );
maplayer.appendChild( transparencyLevelIntElement );
#endif

// now append layer node to map layer node

writeCustomProperties( layerElement, document );
@@ -1212,18 +1192,6 @@ bool QgsMapLayer::importNamedStyle( QDomDocument &myDocument, QString &myErrorMe
setMinimumScale( myRoot.attribute( QStringLiteral( "minimumScale" ) ).toDouble() );
setMaximumScale( myRoot.attribute( QStringLiteral( "maximumScale" ) ).toDouble() );

#if 0
//read transparency level
QDomNode transparencyNode = myRoot.namedItem( "transparencyLevelInt" );
if ( ! transparencyNode.isNull() )
{
// set transparency level only if it's in project
// (otherwise it sets the layer transparent)
QDomElement myElement = transparencyNode.toElement();
setTransparency( myElement.text().toInt() );
}
#endif

return readSymbology( myRoot, myErrorMessage, QgsReadWriteContext() ); // TODO: support relative paths in QML?
}

@@ -1241,14 +1209,6 @@ void QgsMapLayer::exportNamedStyle( QDomDocument &doc, QString &errorMsg ) const
myRootNode.setAttribute( QStringLiteral( "minimumScale" ), QString::number( minimumScale() ) );
myRootNode.setAttribute( QStringLiteral( "maximumScale" ), QString::number( maximumScale() ) );

#if 0
// <transparencyLevelInt>
QDomElement transparencyLevelIntElement = myDocument.createElement( "transparencyLevelInt" );
QDomText transparencyLevelIntText = myDocument.createTextNode( QString::number( getTransparency() ) );
transparencyLevelIntElement.appendChild( transparencyLevelIntText );
myRootNode.appendChild( transparencyLevelIntElement );
#endif

if ( !writeSymbology( myRootNode, myDocument, errorMsg, QgsReadWriteContext() ) ) // TODO: support relative paths in QML?
{
errorMsg = QObject::tr( "Could not save symbology because:\n%1" ).arg( errorMsg );

0 comments on commit 5aae97e

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