Skip to content

Commit

Permalink
Merge pull request #557 from kartoza/minor-fix-raster-reclass-widget
Browse files Browse the repository at this point in the history
minor fix raster reclassification widget
  • Loading branch information
timlinux authored Nov 4, 2024
2 parents 302dd46 + aeb8808 commit ac32cc2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions geest/gui/widgets/raster_reclassification_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -85,10 +83,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)
Expand Down

0 comments on commit ac32cc2

Please sign in to comment.