mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[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
This commit is contained in:
parent
449c9ce86c
commit
5844a0fc90
@ -85,8 +85,13 @@ class BatchInputSelectionPanel(QWidget):
|
|||||||
def showPopupMenu(self):
|
def showPopupMenu(self):
|
||||||
popupmenu = QMenu()
|
popupmenu = QMenu()
|
||||||
|
|
||||||
if (isinstance(self.param, QgsProcessingParameterMultipleLayers) and
|
isLayerParam = isinstance(self.param, (QgsProcessingParameterRasterLayer,
|
||||||
self.param.layerType() != QgsProcessing.TypeFile):
|
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 = QAction(self.tr('Select from Open Layers…'), self.pushButton)
|
||||||
selectLayerAction.triggered.connect(self.showLayerSelectionDialog)
|
selectLayerAction.triggered.connect(self.showLayerSelectionDialog)
|
||||||
popupmenu.addAction(selectLayerAction)
|
popupmenu.addAction(selectLayerAction)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user