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