Skip to content
Permalink
Browse files

[server] Fix some exceptions were not correctly restoring layer opacity

  • Loading branch information
nyalldawson committed Feb 22, 2016
1 parent f264799 commit 173c7d7814b52f05db6bc3ed4b3ec05d26fcf534
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/server/qgswmsserver.cpp
@@ -1286,6 +1286,7 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
QgsComposition* c = mConfigParser->createPrintComposition( mParameters[ "TEMPLATE" ], mMapRenderer, QMap<QString, QString>( mParameters ) );
if ( !c )
{
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
clearFeatureSelections( selectedLayerIdList );
return nullptr;
}
@@ -1334,6 +1335,7 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
if ( !tempFile.open() )
{
delete c;
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
clearFeatureSelections( selectedLayerIdList );
return nullptr;
}
@@ -1344,6 +1346,7 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
}
else //unknown format
{
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
clearFeatureSelections( selectedLayerIdList );
throw QgsMapServiceException( "InvalidFormat", "Output format '" + formatString + "' is not supported in the GetPrint request" );
}

0 comments on commit 173c7d7

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