Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip filtering on raster layer as it trow an error #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dimensions_selector/gui/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import os
import itertools

from qgis.core import QgsProject, QgsMapLayerProxyModel
from qgis.core import QgsProject, QgsMapLayerProxyModel, QgsRasterLayer
from qgis.gui import QgsMapLayerComboBox, QgsFieldComboBox

from qgis.PyQt import uic
Expand Down Expand Up @@ -382,6 +382,8 @@ def on_populateDimensionButton_clicked(self):
items = []
for name in self.selected_dimensions_names():
for id, layer in QgsProject.instance().mapLayers().items():
if isinstance(layer, QgsRasterLayer):
continue
if layer.fields().lookupField(name) == -1:
continue
if self._layer_dimensions_model.hasItem(layer, name):
Expand Down