File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,14 @@ IF(WITH_CORE)
128
128
IF (WITH_SERVER )
129
129
SET (SERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS server should disable ECW (ECW in server apps requires a special license)" )
130
130
131
- SET (WITH_SERVER_PLUGINS TRUE CACHE BOOL "Determines whether QGIS server support for python plugins should be built" )
131
+ SET (WITH_SERVER_PLUGINS ${WITH_BINDINGS} CACHE BOOL "Determines whether QGIS server support for python plugins should be built" )
132
+ IF (WITH_SERVER_PLUGINS AND NOT WITH_BINDINGS )
133
+ MESSAGE (FATAL_ERROR "Server plugins are not supported without python bindings. Enable WITH_BINDINGS or disable WITH_SERVER_PLUGINS" )
134
+ ENDIF (WITH_SERVER_PLUGINS AND NOT WITH_BINDINGS )
132
135
IF (WITH_SERVER_PLUGINS )
133
136
SET (HAVE_SERVER_PYTHON_PLUGINS TRUE )
134
137
ENDIF (WITH_SERVER_PLUGINS )
138
+
135
139
ENDIF (WITH_SERVER )
136
140
137
141
# Custom widgets
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ namespace QgsWms
34
34
// get parameters from query
35
35
QgsWmsParameters parameters ( QUrlQuery ( request.url () ) );
36
36
37
+ // init render context
38
+ QgsWmsRenderContext context ( project, serverIface );
39
+ context.setFlag ( QgsWmsRenderContext::UseScaleDenominator );
40
+ context.setParameters ( parameters );
41
+
37
42
const QString format = request.parameters ().value ( QStringLiteral ( " FORMAT" ), QStringLiteral ( " PNG" ) );
38
43
ImageOutputFormat outputFormat = parseImageFormat ( format );
39
44
@@ -76,11 +81,6 @@ namespace QgsWms
76
81
}
77
82
}
78
83
#endif
79
- // init render context
80
- QgsWmsRenderContext context ( project, serverIface );
81
- context.setFlag ( QgsWmsRenderContext::UseScaleDenominator );
82
- context.setParameters ( parameters );
83
-
84
84
QgsRenderer renderer ( context );
85
85
86
86
std::unique_ptr<QImage> result ( renderer.getLegendGraphics () );
You can’t perform that action at this time.
0 commit comments