mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] don't use temp folder for default output folder
This commit is contained in:
parent
54bdcefc11
commit
4692eb526b
@ -29,13 +29,13 @@ import os
|
||||
|
||||
from PyQt4.QtCore import QPyNullVariant, QCoreApplication, QSettings
|
||||
from PyQt4.QtGui import QIcon
|
||||
from processing.tools.system import tempFolder
|
||||
from processing.tools.system import defaultOutputFolder
|
||||
import processing.tools.dataobjects
|
||||
|
||||
|
||||
class ProcessingConfig:
|
||||
|
||||
OUTPUT_FOLDER = 'OUTPUT_FOLDER'
|
||||
OUTPUT_FOLDER = 'OUTPUTS_FOLDER'
|
||||
RASTER_STYLE = 'RASTER_STYLE'
|
||||
VECTOR_POINT_STYLE = 'VECTOR_POINT_STYLE'
|
||||
VECTOR_LINE_STYLE = 'VECTOR_LINE_STYLE'
|
||||
@ -83,7 +83,7 @@ class ProcessingConfig:
|
||||
ProcessingConfig.addSetting(Setting(
|
||||
ProcessingConfig.tr('General'),
|
||||
ProcessingConfig.OUTPUT_FOLDER,
|
||||
ProcessingConfig.tr('Output folder'), tempFolder(),
|
||||
ProcessingConfig.tr('Output folder'), defaultOutputFolder(),
|
||||
valuetype=Setting.FOLDER))
|
||||
ProcessingConfig.addSetting(Setting(
|
||||
ProcessingConfig.tr('General'),
|
||||
|
@ -45,6 +45,12 @@ def userFolder():
|
||||
|
||||
return unicode(QDir.toNativeSeparators(userDir))
|
||||
|
||||
def defaultOutputFolder():
|
||||
folder = os.path.join(os.path.dirname(QgsApplication.qgisUserDbFilePath()), "processing", "outputs")
|
||||
if not QDir(folder).exists():
|
||||
QDir().mkpath(folder)
|
||||
|
||||
return unicode(QDir.toNativeSeparators(folder))
|
||||
|
||||
def isWindows():
|
||||
return os.name == 'nt'
|
||||
|
Loading…
x
Reference in New Issue
Block a user