Skip to content
Permalink
Browse files

[processing] allow selecting input from open layers only if input is a

layer-type (e.g. raster, vector, mesh). All other inputs can be selected
only from filesystem
  • Loading branch information
alexbruy committed May 14, 2019
1 parent 449c9ce commit 5844a0fc906c744327139e137642f0ec97ae240a
Showing with 7 additions and 2 deletions.
  1. +7 −2 python/plugins/processing/gui/BatchInputSelectionPanel.py
@@ -85,8 +85,13 @@ def _table(self):
def showPopupMenu(self):
popupmenu = QMenu()

if (isinstance(self.param, QgsProcessingParameterMultipleLayers) and
self.param.layerType() != QgsProcessing.TypeFile):
isLayerParam = isinstance(self.param, (QgsProcessingParameterRasterLayer,
QgsProcessingParameterVectorLayer,
QgsProcessingParameterMeshLayer,
QgsProcessingParameterFeatureSource))

if isLayerParam or (isinstance(self.param, QgsProcessingParameterMultipleLayers) and
self.param.layerType() != QgsProcessing.TypeFile):
selectLayerAction = QAction(self.tr('Select from Open Layers…'), self.pushButton)
selectLayerAction.triggered.connect(self.showLayerSelectionDialog)
popupmenu.addAction(selectLayerAction)

0 comments on commit 5844a0f

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