Skip to content
Browse files
Merge pull request #3726 from arnaud-morvan/processing_various_fixes
[processing] small fixes
  • Loading branch information
volaya committed Nov 8, 2016
2 parents db35b38 + 4a62699 commit 7c4e66b360dfcd2f340c9c40c22d66351ce57fa9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
@@ -31,8 +31,8 @@
from collections import OrderedDict

from qgis.PyQt import uic
from qgis.PyQt.QtGui import QBrush, QIcon, QSpacerItem
from qgis.PyQt.QtWidgets import QComboBox, QHeaderView, QLineEdit, QMessageBox, QSpinBox, QStyledItemDelegate
from qgis.PyQt.QtGui import QBrush, QIcon
from qgis.PyQt.QtWidgets import QComboBox, QHeaderView, QLineEdit, QSpacerItem, QMessageBox, QSpinBox, QStyledItemDelegate
from qgis.PyQt.QtCore import QItemSelectionModel, QAbstractTableModel, QModelIndex, QVariant, Qt, pyqtSlot

from qgis.core import QgsExpression, QgsExpressionContextUtils, QgsApplication, QgsFeature
@@ -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,
s = str(widget.getText())
s = os.path.basename(s)
s = os.path.splitext(s)[0]
v = widget.value()
if isinstance(v, QgsMapLayer):
s =
s = os.path.basename(v)
s = os.path.splitext(s)[0]
elif isinstance(param, ParameterBoolean):
s = str(widget.currentIndex() == 0)
elif isinstance(param, ParameterSelection):
@@ -741,7 +741,7 @@ def value(self):
return self.widget.getValue()
elif self.dialogType == DIALOG_BATCH:
return self.widget.getText()
return self.widget.value()
def validator(v):
return bool(v) or self.param.optional

0 comments on commit 7c4e66b

Please sign in to comment.