Skip to content
Snippets Groups Projects
Commit b374203b authored by Arnaud MORVAN's avatar Arnaud MORVAN
Browse files

Fix import_tracks to tmp layer

parent 131dc69b
No related branches found
No related tags found
1 merge request!79Gsedfqgis 115 fix import trace to tmp
Pipeline #22467 passed
...@@ -2,6 +2,7 @@ from qgis.core import ( ...@@ -2,6 +2,7 @@ from qgis.core import (
QgsApplication, QgsApplication,
QgsProcessing, QgsProcessing,
QgsProcessingMultiStepFeedback, QgsProcessingMultiStepFeedback,
QgsProcessingOutputLayerDefinition,
QgsProcessingParameterBoolean, QgsProcessingParameterBoolean,
QgsProcessingParameterFeatureSource, QgsProcessingParameterFeatureSource,
QgsProcessingParameterNumber, QgsProcessingParameterNumber,
...@@ -334,6 +335,9 @@ class ImportTracksAlgorithm(PreCourlisAlgorithm): ...@@ -334,6 +335,9 @@ class ImportTracksAlgorithm(PreCourlisAlgorithm):
if feedback.isCanceled(): if feedback.isCanceled():
return {} return {}
output = QgsProcessingOutputLayerDefinition(parameters[self.OUTPUT])
output.destinationName = self.tr("Sections")
# orderbyexpression (dump layer with changes from edit buffer) # orderbyexpression (dump layer with changes from edit buffer)
layer.selectAll() layer.selectAll()
alg_params = { alg_params = {
...@@ -341,7 +345,7 @@ class ImportTracksAlgorithm(PreCourlisAlgorithm): ...@@ -341,7 +345,7 @@ class ImportTracksAlgorithm(PreCourlisAlgorithm):
"EXPRESSION": '"sec_id"', "EXPRESSION": '"sec_id"',
"ASCENDING": True, "ASCENDING": True,
"NULLS_FIRST": False, "NULLS_FIRST": False,
"OUTPUT": self.parameterAsOutputLayer(parameters, self.OUTPUT, context), "OUTPUT": output,
} }
outputs["OrderByExpression"] = processing.run( outputs["OrderByExpression"] = processing.run(
"native:orderbyexpression", "native:orderbyexpression",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment