mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-18 00:06:00 -04:00
[processing] minor fixes related to settings
This commit is contained in:
parent
9aff0d7355
commit
b1570fb20a
@ -232,7 +232,7 @@ class GeoAlgorithm:
|
|||||||
self.runHookScript(scriptFile, progress)
|
self.runHookScript(scriptFile, progress)
|
||||||
|
|
||||||
def runHookScript(self, filename, progress):
|
def runHookScript(self, filename, progress):
|
||||||
if not os.path.exists(filename):
|
if filename is None or not os.path.exists(filename):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
script = 'import processing\n'
|
script = 'import processing\n'
|
||||||
|
@ -26,7 +26,7 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
|||||||
__revision__ = '$Format:%H$'
|
__revision__ = '$Format:%H$'
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui,QtCore
|
||||||
from processing.tools.system import *
|
from processing.tools.system import *
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +150,10 @@ class ProcessingConfig:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getSetting(name):
|
def getSetting(name):
|
||||||
if name in ProcessingConfig.settings.keys():
|
if name in ProcessingConfig.settings.keys():
|
||||||
return ProcessingConfig.settings[name].value
|
v = ProcessingConfig.settings[name].value
|
||||||
|
if isinstance(v, QtCore.QPyNullVariant):
|
||||||
|
v = None
|
||||||
|
return v
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user