Skip to content

Commit 82aea9d

Browse files
committed
fix bad lambda function
1 parent e03b3d1 commit 82aea9d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Mergin/project_settings_widget.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ def __init__(self, parent=None):
156156
self.label_vcrs_warning.setOpenExternalLinks(False)
157157
self.label_vcrs_warning.linkActivated.connect(self._download_geoid_grid)
158158

159-
QgsProject.instance().transformContextChanged.connect(
160-
lambda: self._check_geoid_grid(self.cmb_vertical_crs.crs())
161-
)
159+
QgsProject.instance().transformContextChanged.connect(self._on_transformation_modified)
162160

163161
use_vcrs, ok = QgsProject.instance().readBoolEntry("Mergin", "ElevationTransformationEnabled", False)
164162
self.chk_use_vertical_crs.setChecked(use_vcrs)
@@ -584,3 +582,7 @@ def colors_change_state(self) -> None:
584582
item = self.mColorsHorizontalLayout.itemAt(i).widget()
585583
if isinstance(item, QgsColorButton):
586584
item.setEnabled(self.chk_map_sketches_enabled.isChecked())
585+
586+
def _on_transformation_modified(self):
587+
if self.cmb_vertical_crs:
588+
self._check_geoid_grid(self.cmb_vertical_crs.crs())

0 commit comments

Comments
 (0)