From 8ea66063ead04878d3037542e9e5c1d08f89edf9 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 14 Sep 2024 11:54:20 +0700 Subject: [PATCH] Fix broken compatibility with QGIS 3.18 --- qfieldsync/gui/mapthemes_config_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qfieldsync/gui/mapthemes_config_widget.py b/qfieldsync/gui/mapthemes_config_widget.py index 76c6cc33..0ba72ca1 100644 --- a/qfieldsync/gui/mapthemes_config_widget.py +++ b/qfieldsync/gui/mapthemes_config_widget.py @@ -21,7 +21,7 @@ ***************************************************************************/ """ -from qgis.core import Qgis +from qgis.core import QgsMapLayerProxyModel from qgis.gui import QgsMapLayerComboBox from qgis.PyQt.QtCore import Qt @@ -61,7 +61,7 @@ def reload(self, configuration): cmb = QgsMapLayerComboBox() cmb.setAllowEmptyLayer(True) cmb.setProject(self.project) - cmb.setFilters(Qgis.LayerFilter.VectorLayer) + cmb.setFilters(QgsMapLayerProxyModel.VectorLayer) if map_theme in configuration: cmb.setLayer(self.project.mapLayer(configuration[map_theme])) self.setCellWidget(count, 1, cmb)