Skip to content

Commit

Permalink
add a check for saved drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli committed Dec 11, 2024
1 parent f9ff6f1 commit 5f2be16
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/qgis_gea_plugin/gui/qgis_gea.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,8 @@ def on_generate_report(self):

elif group == SITE_GROUP_NAME:
message = tr(
"Report Generation Error:"
" No site drawing has been created or saved. "
"Report Generation Error: "
"No site drawing has been created or saved. "
"To generate a report, please complete the "
"following steps: fill in the attributes, "
"draw a site polygon, save your work, and "
Expand All @@ -1253,6 +1253,13 @@ def on_generate_report(self):
if not self.is_project_info_valid(message):
return

if site_layer.dataProvider().dataSourceUri().startswith('memory'):
self.show_message(
message,
Qgis.Warning
)
return

# Get capture date and area
feature = features[0]

Expand Down

0 comments on commit 5f2be16

Please sign in to comment.