Showing with 10 additions and 4 deletions.
  1. +4 −1 python/plugins/processing/core/Processing.py
  2. +3 −0 python/plugins/processing/core/SilentProgress.py
  3. +3 −3 python/plugins/processing/tools/dataobjects.py
5 changes: 4 additions & 1 deletion python/plugins/processing/core/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.ProcessingLog import ProcessingLog
from processing.core.SilentProgress import SilentProgress
from processing.gui.AlgorithmClassification import AlgorithmDecorator
from processing.gui.MessageBarProgress import MessageBarProgress
from processing.gui.RenderingStyles import RenderingStyles
Expand Down Expand Up @@ -347,7 +348,9 @@ def runAlgorithm(algOrName, onFinish, *args):
elif cursor.shape() != Qt.WaitCursor:
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))

progress = MessageBarProgress()
progress = SilentProgress()
if not interface.iface == None :
progress = MessageBarProgress()
ret = UnthreadedAlgorithmExecutor.runalg(alg, progress)
if onFinish is not None and ret:
onFinish(alg, progress)
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/processing/core/SilentProgress.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ def setDebugInfo(self, _):

def setConsoleInfo(self, _):
pass

def close(self):
pass
6 changes: 3 additions & 3 deletions python/plugins/processing/tools/dataobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def getSupportedOutputTableExtensions():


def getRasterLayers():
layers = interface.iface.legendInterface().layers()
layers = QgsMapLayerRegistry.instance().mapLayers().values()
raster = list()

for layer in layers:
Expand All @@ -76,7 +76,7 @@ def getRasterLayers():


def getVectorLayers(shapetype=[-1]):
layers = interface.iface.legendInterface().layers()
layers = QgsMapLayerRegistry.instance().mapLayers().values()
vector = []
for layer in layers:
if layer.type() == layer.VectorLayer:
Expand All @@ -96,7 +96,7 @@ def getAllLayers():


def getTables():
layers = interface.iface.legendInterface().layers()
layers = QgsMapLayerRegistry.instance().mapLayers().values()
tables = list()
for layer in layers:
if layer.type() == layer.VectorLayer:
Expand Down