Skip to content
Permalink
Browse files

[processing] Fix loading batch settings with date/time values

Fixes #37838
  • Loading branch information
nyalldawson committed Jul 27, 2020
1 parent b938130 commit 6e2d1023f2779d069b3e36cbd70aebe6563497a9
Showing with 16 additions and 1 deletion.
  1. +14 −1 python/plugins/processing/gui/BatchPanel.py
  2. +2 −0 python/plugins/processing/gui/HistoryDialog.py
@@ -37,7 +37,19 @@
QMenu,
QAction
)
from qgis.PyQt.QtGui import QPalette

# adding to this list? also update the HistoryDialog.py executeAlgorithm imports!!

from qgis.PyQt.QtCore import (
QTime, # NOQA - must be here for saved file evaluation
QDate, # NOQA - must be here for saved file evaluation
QDateTime # NOQA - must be here for saved file evaluation
)
from qgis.PyQt.QtGui import (
QPalette,
QColor, # NOQA - must be here for saved file evaluation
)

from qgis.PyQt.QtCore import (
QDir,
QFileInfo,
@@ -49,6 +61,7 @@
QgsSettings,
QgsProperty, # NOQA - must be here for saved file evaluation
QgsProject,
QgsFeatureRequest, # NOQA - must be here for saved file evaluation
QgsProcessingFeatureSourceDefinition, # NOQA - must be here for saved file evaluation
QgsCoordinateReferenceSystem, # NOQA - must be here for saved file evaluation
QgsProcessingParameterDefinition,
@@ -120,7 +120,9 @@ def executeAlgorithm(self):
if isinstance(item, TreeLogEntryItem):
if item.isAlg:
script = 'import processing\n'
# adding to this list? Also update the BatchPanel.py imports!!
script += 'from qgis.core import QgsProcessingOutputLayerDefinition, QgsProcessingFeatureSourceDefinition, QgsProperty, QgsCoordinateReferenceSystem, QgsFeatureRequest\n'
script += 'from qgis.PyQt.QtCore import QDate, QTime, QDateTime\n'
script += 'from qgis.PyQt.QtGui import QColor\n'
script += item.entry.text.replace('processing.run(', 'processing.execAlgorithmDialog(')
self.close()

0 comments on commit 6e2d102

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