Skip to content

Commit

Permalink
Add some comments for checkParameters function
Browse files Browse the repository at this point in the history
also set const back
  • Loading branch information
elpaso committed Sep 18, 2019
1 parent 5b33600 commit 55f89db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetlegendgraphics.cpp
Expand Up @@ -171,7 +171,7 @@ namespace QgsWms
QgsLayerTreeModel *legendModel( const QgsWmsRenderContext &context, QgsLayerTree &tree )
{

QgsWmsParameters parameters = context.parameters();
const QgsWmsParameters parameters = context.parameters();
std::unique_ptr<QgsLayerTreeModel> model( new QgsLayerTreeModel( &tree ) );

if ( context.scaleDenominator() > 0 )
Expand Down
4 changes: 4 additions & 0 deletions src/server/services/wms/qgswmsgetlegendgraphics.h
Expand Up @@ -32,6 +32,10 @@ namespace QgsWms
const QString &version, const QgsServerRequest &request,
QgsServerResponse &response );

/**
* checkParameters checks request \a parameters and sets HEIGHT and WIDTH to default values
* in case BBOX is specified for contextual legend and HEIGHT or WIDTH are not.
*/
void checkParameters( QgsWmsParameters &parameters );

QgsLayerTreeModel *legendModel( const QgsWmsRenderContext &context, QgsLayerTree &tree );
Expand Down

0 comments on commit 55f89db

Please sign in to comment.