Skip to content
Browse files
[processing] remember last path for batch processes
Fixes #16310
  • Loading branch information
volaya committed Aug 23, 2017
1 parent 3ef008c commit 64f3e67
Showing 1 changed file with 9 additions and 2 deletions.
@@ -31,6 +31,7 @@
from qgis.PyQt import uic
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QTableWidgetItem, QComboBox, QLineEdit, QHeaderView, QFileDialog, QMessageBox
from qgis.PyQt.QtCore import QSettings

from qgis.core import QgsApplication

@@ -178,9 +179,15 @@ def getWidgetFromParameter(self, param, row, col):

return item

def getLastFolder():
settings = QSettings()
if settings.contains('/Processing/LastBatchInputPath'):
return settings.value('/Processing/LastBatchInputPath')

def load(self):
filename = unicode(QFileDialog.getOpenFileName(self,'Open batch'), None,'Open batch'),
self.getLastFolder(),'JSON files (*.json)')))
if filename:
with open(filename) as f:
@@ -287,7 +294,7 @@ def save(self):

filename = unicode(QFileDialog.getSaveFileName(self,'Save batch'),
self.getLastFolder(),'JSON files (*.json)')))
if filename:
if not filename.endswith('.json'):

0 comments on commit 64f3e67

Please sign in to comment.