Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix build, indentation
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 6648a95 commit 29fa7b6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/AlgorithmDialog.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/Postprocessing.py
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/3d/qgs3dutils.cpp
Expand Up @@ -22,6 +22,7 @@
#include "qgsfeature.h"
#include "qgsabstractgeometry.h"
#include "qgsvectorlayer.h"
#include "qgsexpressioncontextutils.h"

#include "qgs3dmapscene.h"
#include "qgsabstract3dengine.h"
Expand Down
1 change: 1 addition & 0 deletions src/3d/symbols/qgsmesh3dsymbol_p.cpp
Expand Up @@ -28,6 +28,7 @@
#include "qgsmultipolygon.h"
#include "qgsmeshlayer.h"
#include "qgstriangularmesh.h"
#include "qgsexpressioncontextutils.h"

static QgsExpressionContext _expressionContext3D()
{
Expand Down
20 changes: 10 additions & 10 deletions src/core/raster/qgsmultibandcolorrenderer.cpp
Expand Up @@ -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 ) );
}
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgsrasterrerderer_createsld.py
Expand Up @@ -423,6 +423,7 @@ def testSingleBandGrayRenderer(self):

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

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

Expand Down

0 comments on commit 29fa7b6

Please sign in to comment.