Skip to content
Permalink
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
@@ -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,
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):
@@ -741,7 +741,7 @@ def value(self):
except:
return self.widget.getValue()
elif self.dialogType == DIALOG_BATCH:
return self.widget.getText()
return self.widget.value()
else:
def validator(v):
return bool(v) or self.param.optional

0 comments on commit 7c4e66b

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