Skip to content
Permalink
Browse files

Fix build, indentation

  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 6648a95 commit 29fa7b6e7b054607c12e1c4328b5a164c2eb32e8
@@ -527,7 +527,7 @@ def __init__(self, row, table):
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 @@ def finish(self, successful, result, context, feedback):
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 @@ def testSingleBandGrayRenderer(self):

def testRasterRenderer(self):
class fakerenderer(QgsRasterRenderer):

def __init__(self, interface):
QgsRasterRenderer.__init__(self, interface, '')

0 comments on commit 29fa7b6

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