Skip to content

Commit

Permalink
Merge pull request #89 from opengisch/QF-4529-fix-map-theme-basemap
Browse files Browse the repository at this point in the history
Fix "No basemap layer selected" error when map theme is used for basemap
  • Loading branch information
suricactus authored Jul 12, 2024
2 parents 61523b5 + cb10b30 commit 528345d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libqfieldsync/offline_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,18 +483,18 @@ def _export_basemap(self) -> bool:
)
return False

if not self.project_configuration.base_map_layer.strip():
self.warning.emit(
self.tr("Failed to create basemap"),
self.tr(
"No basemap layer selected. Please check the project configuration."
).format(self.project_configuration.base_map_layer),
)
return False

extent = basemap_extent
base_map_type = self.project_configuration.base_map_type
if base_map_type == ProjectProperties.BaseMapType.SINGLE_LAYER:
if not self.project_configuration.base_map_layer.strip():
self.warning.emit(
self.tr("Failed to create basemap"),
self.tr(
"No basemap layer selected. Please check the project configuration."
),
)
return False

basemap_layer = project.mapLayer(self.project_configuration.base_map_layer)

if not basemap_layer:
Expand Down

0 comments on commit 528345d

Please sign in to comment.