mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
[processing] Fix loading batch settings with date/time values
Fixes #37838
This commit is contained in:
parent
b93813080b
commit
6e2d1023f2
@ -37,7 +37,19 @@ from qgis.PyQt.QtWidgets import (
|
||||
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 @@ from qgis.core import (
|
||||
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 @@ class HistoryDialog(BASE, WIDGET):
|
||||
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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user