diff --git a/nlsgpkgloader/nls_geopackage_loader.py b/nlsgpkgloader/nls_geopackage_loader.py index 104e6ed..ea98a4b 100644 --- a/nlsgpkgloader/nls_geopackage_loader.py +++ b/nlsgpkgloader/nls_geopackage_loader.py @@ -666,16 +666,12 @@ def load_layers(self): def select_deselect_all_layers(self): if self.municipalities_dialog.selectDeselectAll.isChecked(): - items_to_select = [] for value in self.product_types.values(): items = self.municipalities_dialog.productListWidget.findItems( value, Qt.MatchExactly ) if items: - items_to_select.append(items[0]) - - for item in items_to_select: - item.setSelected(True) + items[0].setSelected(True) else: self.municipalities_dialog.productListWidget.clearSelection()