Skip to content

Commit

Permalink
Fix loading batch settings with date/time values
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Jul 27, 2020
1 parent 520d3da commit 20eddb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion python/plugins/processing/gui/BatchPanel.py
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions python/plugins/processing/gui/HistoryDialog.py
Expand Up @@ -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()
Expand Down

0 comments on commit 20eddb8

Please sign in to comment.