From 5f2be16c7c12e126c85b116c618f7f5b7efc884f Mon Sep 17 00:00:00 2001 From: Samweli Date: Wed, 11 Dec 2024 11:17:29 +0300 Subject: [PATCH] add a check for saved drawing --- src/qgis_gea_plugin/gui/qgis_gea.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qgis_gea_plugin/gui/qgis_gea.py b/src/qgis_gea_plugin/gui/qgis_gea.py index be3bd08..68ca430 100644 --- a/src/qgis_gea_plugin/gui/qgis_gea.py +++ b/src/qgis_gea_plugin/gui/qgis_gea.py @@ -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 " @@ -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]