mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix build, indentation
This commit is contained in:
parent
6648a955bc
commit
29fa7b6e7b
@ -527,7 +527,7 @@ class ORTableField(TableField):
|
||||
def type2String(self):
|
||||
if (u"TIMESTAMP" in self.dataType
|
||||
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
|
||||
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
|
||||
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
|
||||
return u"{}".format(self.dataType)
|
||||
if self.charMaxLen in [None, -1]:
|
||||
return u"{}".format(self.dataType)
|
||||
|
@ -301,7 +301,7 @@ class AlgorithmDialog(QgsProcessingAlgorithmDialogBase):
|
||||
for out in self.algorithm().outputDefinitions():
|
||||
if isinstance(out, QgsProcessingOutputHtml) and out.name() in result and result[out.name()]:
|
||||
resultsList.addResult(icon=self.algorithm().icon(), name=out.description(), timestamp=time.localtime(),
|
||||
result=result[out.name()])
|
||||
result=result[out.name()])
|
||||
if not handleAlgorithmResults(self.algorithm(), context, feedback, not keepOpen, result):
|
||||
self.resetGui()
|
||||
return
|
||||
|
@ -104,7 +104,7 @@ def handleAlgorithmResults(alg, context, feedback=None, showResults=True, parame
|
||||
if outValue == l:
|
||||
outputName = out.name()
|
||||
break
|
||||
style = None
|
||||
style = None
|
||||
if outputName:
|
||||
style = RenderingStyles.getStyle(alg.id(), outputName)
|
||||
if style is None:
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "qgsfeature.h"
|
||||
#include "qgsabstractgeometry.h"
|
||||
#include "qgsvectorlayer.h"
|
||||
#include "qgsexpressioncontextutils.h"
|
||||
|
||||
#include "qgs3dmapscene.h"
|
||||
#include "qgsabstract3dengine.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "qgsmultipolygon.h"
|
||||
#include "qgsmeshlayer.h"
|
||||
#include "qgstriangularmesh.h"
|
||||
#include "qgsexpressioncontextutils.h"
|
||||
|
||||
static QgsExpressionContext _expressionContext3D()
|
||||
{
|
||||
|
@ -475,18 +475,18 @@ void QgsMultiBandColorRenderer::toSld( QDomDocument &doc, QDomElement &element,
|
||||
|
||||
// look for RasterSymbolizer tag
|
||||
QDomNodeList elements = element.elementsByTagName( QStringLiteral( "sld:RasterSymbolizer" ) );
|
||||
if ( elements.size() == 0 )
|
||||
return;
|
||||
if ( elements.size() == 0 )
|
||||
return;
|
||||
|
||||
// there SHOULD be only one
|
||||
QDomElement rasterSymbolizerElem = elements.at( 0 ).toElement();
|
||||
// there SHOULD be only one
|
||||
QDomElement rasterSymbolizerElem = elements.at( 0 ).toElement();
|
||||
|
||||
// add Channel Selection tags
|
||||
// Need to insert channelSelection in the correct sequence as in SLD standard e.g.
|
||||
// after opacity or geometry or as first element after sld:RasterSymbolizer
|
||||
QDomElement channelSelectionElem = doc.createElement( QStringLiteral( "sld:ChannelSelection" ) );
|
||||
elements = rasterSymbolizerElem.elementsByTagName( QStringLiteral( "sld:Opacity" ) );
|
||||
if ( elements.size() != 0 )
|
||||
// add Channel Selection tags
|
||||
// Need to insert channelSelection in the correct sequence as in SLD standard e.g.
|
||||
// after opacity or geometry or as first element after sld:RasterSymbolizer
|
||||
QDomElement channelSelectionElem = doc.createElement( QStringLiteral( "sld:ChannelSelection" ) );
|
||||
elements = rasterSymbolizerElem.elementsByTagName( QStringLiteral( "sld:Opacity" ) );
|
||||
if ( elements.size() != 0 )
|
||||
{
|
||||
rasterSymbolizerElem.insertAfter( channelSelectionElem, elements.at( 0 ) );
|
||||
}
|
||||
|
@ -423,6 +423,7 @@ class TestQgsRasterRendererCreateSld(unittest.TestCase):
|
||||
|
||||
def testRasterRenderer(self):
|
||||
class fakerenderer(QgsRasterRenderer):
|
||||
|
||||
def __init__(self, interface):
|
||||
QgsRasterRenderer.__init__(self, interface, '')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user