From 9d643cd7cdea519693145ad1ba36d282f6ed3ccb Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Sun, 28 Jul 2024 14:02:50 +0100 Subject: [PATCH 1/2] fix lock layer attributes button not working --- src/qgis_conefor/conefordialog.py | 1 + src/qgis_conefor/main.py | 1 + src/qgis_conefor/tablemodel.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qgis_conefor/conefordialog.py b/src/qgis_conefor/conefordialog.py index 79ba9de..f962ba8 100644 --- a/src/qgis_conefor/conefordialog.py +++ b/src/qgis_conefor/conefordialog.py @@ -89,6 +89,7 @@ def use_selected_features_toggled(self, state: int): def toggle_lock_layers(self, lock): index = self.model.index(0, 0) + self.model.lock_layers = lock self.tableView.setFocus() def show_help(self): diff --git a/src/qgis_conefor/main.py b/src/qgis_conefor/main.py index 7093203..aab3cb5 100644 --- a/src/qgis_conefor/main.py +++ b/src/qgis_conefor/main.py @@ -318,6 +318,7 @@ def prepare_conefor_inputs(self): kwargs.update({ "default_node_identifier_name": first.id_attribute_field_name, "default_node_attribute_name": first.attribute_field_name, + "default_nodes_to_add_attribute_name": first.nodes_to_add_field_name, }) for idx, data_item in enumerate(self.dialog.model.layers_to_process): if idx == 0 or not self.dialog.lock_layers_chb.isChecked(): diff --git a/src/qgis_conefor/tablemodel.py b/src/qgis_conefor/tablemodel.py index c7fa2e7..8445106 100644 --- a/src/qgis_conefor/tablemodel.py +++ b/src/qgis_conefor/tablemodel.py @@ -110,7 +110,7 @@ def headerData(self, section: int, orientation, role=QtCore.Qt.DisplayRole): def flags(self, index): if self.lock_layers: - if index.row() == 0: + if index.row() == 0 or index.column() == 0: result = QtCore.Qt.ItemFlags( QtCore.QAbstractTableModel.flags(self, index) | QtCore.Qt.ItemIsEditable From d1dc247e58c4ba6746925d3ead0ef4afc965f3ec Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Sun, 28 Jul 2024 14:03:45 +0100 Subject: [PATCH 2/2] Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6a27a8..f2d537b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Fix 'lock attributes to first layer' button not working - Prevent using a float attribute as the node identifier - Add validation of node-related attributes when using the processing algorithm that prepares conefor inputs - Fix main dialog always using default values for layers