From 47f33870cbc64a8a436673560f266e69cacb9c0c Mon Sep 17 00:00:00 2001 From: Jeff Osundwa Date: Mon, 4 Nov 2024 16:49:41 +0300 Subject: [PATCH 1/2] minor fix rasetr reclassification widget --- geest/gui/widgets/raster_reclassification_widget.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/geest/gui/widgets/raster_reclassification_widget.py b/geest/gui/widgets/raster_reclassification_widget.py index f37d036..73ab10c 100644 --- a/geest/gui/widgets/raster_reclassification_widget.py +++ b/geest/gui/widgets/raster_reclassification_widget.py @@ -85,10 +85,8 @@ def _add_raster_layer_widgets(self) -> None: self.raster_button = QToolButton() self.raster_button.setText("...") self.raster_button.clicked.connect(self.select_raster) - if self.attributes.get(f"{self.widget_key}_raster_layer", False): - self.raster_line_edit.setText( - self.attributes[f"{self.widget_key}_raster_layer"] - ) + if self.attributes.get(f"{self.widget_key}_raster", False): + self.raster_line_edit.setText(self.attributes[f"{self.widget_key}_raster"]) self.raster_layout.addWidget(self.raster_line_edit) self.raster_layout.addWidget(self.raster_button) self.main_layout.addLayout(self.raster_layout) From aeb8808163715a16eed185c113722cacdb79ec08 Mon Sep 17 00:00:00 2001 From: Jeff Osundwa Date: Mon, 4 Nov 2024 16:52:48 +0300 Subject: [PATCH 2/2] fix layer id --- geest/gui/widgets/raster_reclassification_widget.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/geest/gui/widgets/raster_reclassification_widget.py b/geest/gui/widgets/raster_reclassification_widget.py index 73ab10c..83ba8c5 100644 --- a/geest/gui/widgets/raster_reclassification_widget.py +++ b/geest/gui/widgets/raster_reclassification_widget.py @@ -71,9 +71,7 @@ def _add_raster_layer_widgets(self) -> None: self.main_layout.addWidget(self.raster_layer_combo) # Restore previously selected raster layer - raster_layer_id = self.attributes.get( - f"{self.widget_key}_raster_layer_id", None - ) + raster_layer_id = self.attributes.get(f"{self.widget_key}_layer_id", None) if raster_layer_id: raster_layer = QgsProject.instance().mapLayer(raster_layer_id) if raster_layer: