Skip to content
Permalink
Browse files

Use proper Map Theme parameter type in rasterize algorithm

  • Loading branch information
nyalldawson committed Jan 4, 2020
1 parent 35e7fc7 commit 412ce7ddb3f50dba1196e52a1d319608081cef72
Showing with 4 additions and 11 deletions.
  1. +4 −11 src/analysis/processing/qgsalgorithmrasterize.cpp
@@ -90,17 +90,10 @@ void QgsRasterizeAlgorithm::initAlgorithm( const QVariantMap & )
QObject::tr( "Make background transparent" ),
false ) );

std::unique_ptr< QgsProcessingParameterString > mapThemeParam = qgis::make_unique< QgsProcessingParameterString >(
QStringLiteral( "MAP_THEME" ),
QObject::tr( "Map theme to render" ),
QVariant(), false, true );

QVariantMap metadataClass;
metadataClass.insert( QStringLiteral( "class" ), QStringLiteral( "processing.gui.wrappers_map_theme.MapThemeWrapper" ) );
QVariantMap metadata;
metadata.insert( QStringLiteral( "widget_wrapper" ), metadataClass );
mapThemeParam->setMetadata( metadata );
addParameter( mapThemeParam.release() );
addParameter( new QgsProcessingParameterMapTheme(
QStringLiteral( "MAP_THEME" ),
QObject::tr( "Map theme to render" ),
QVariant(), true ) );

QList<QgsMapLayer *> projectLayers { QgsProject::instance()->mapLayers().values() };
addParameter( new QgsProcessingParameterMultipleLayers(

0 comments on commit 412ce7d

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