Skip to content
Permalink
Browse files

[processing] Fix BatchOutputSelectionPanel with QgsMapLayer instances

  • Loading branch information
arnaud-morvan committed Nov 6, 2016
1 parent 93be141 commit 2d2fe8b8cc3b86c244b2dbf851552c180b8dbb07
Showing with 7 additions and 3 deletions.
  1. +7 −3 python/plugins/processing/gui/BatchOutputSelectionPanel.py
@@ -31,6 +31,7 @@
import os
import re

from qgis.core import QgsMapLayer
from qgis.PyQt.QtWidgets import QWidget, QPushButton, QLineEdit, QHBoxLayout, QSizePolicy, QFileDialog
from qgis.PyQt.QtCore import QSettings

@@ -113,9 +114,12 @@ def showSelectionDialog(self):
if isinstance(param, (ParameterRaster,
ParameterVector, ParameterTable,
ParameterMultipleInput)):
s = str(widget.getText())
s = os.path.basename(s)
s = os.path.splitext(s)[0]
v = widget.value()
if isinstance(v, QgsMapLayer):
s = v.name()
else:
s = os.path.basename(v)
s = os.path.splitext(s)[0]
elif isinstance(param, ParameterBoolean):
s = str(widget.currentIndex() == 0)
elif isinstance(param, ParameterSelection):

0 comments on commit 2d2fe8b

Please sign in to comment.
You can’t perform that action at this time.