From 5a2ef39399cfc73b377ed6050761012fc9d470e0 Mon Sep 17 00:00:00 2001 From: signedav Date: Wed, 21 Jun 2023 14:48:18 +0200 Subject: [PATCH] Deactivate next button while searching for referenceData - as well decrease the timeout, since it's unreliable anyway. This does not fix #809 in a nice way but makes it ways more enjoyable --- QgisModelBaker/gui/topping_wizard/referencedata_page.py | 2 +- QgisModelBaker/gui/workflow_wizard/workflow_wizard.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/QgisModelBaker/gui/topping_wizard/referencedata_page.py b/QgisModelBaker/gui/topping_wizard/referencedata_page.py index 97fb9bc51..58b2a7f6a 100644 --- a/QgisModelBaker/gui/topping_wizard/referencedata_page.py +++ b/QgisModelBaker/gui/topping_wizard/referencedata_page.py @@ -145,7 +145,7 @@ def update_referecedata_cache_model(self, filter_models, type): timer = QTimer() timer.setSingleShot(True) timer.timeout.connect(lambda: loop.quit()) - timer.start(10000) + timer.start(3000) self.refresh_referencedata_cache(filter_models, type) loop.exec() return self.ilireferencedatacache.model diff --git a/QgisModelBaker/gui/workflow_wizard/workflow_wizard.py b/QgisModelBaker/gui/workflow_wizard/workflow_wizard.py index 3aac51afb..e49471084 100644 --- a/QgisModelBaker/gui/workflow_wizard/workflow_wizard.py +++ b/QgisModelBaker/gui/workflow_wizard/workflow_wizard.py @@ -257,6 +257,7 @@ def next_id(self): "Checking for potential referenced data on the repositories (might take a while)..." ) ) + self.schema_configuration_page.setComplete(False) if ( self.import_data_file_model.rowCount() or self.update_referecedata_cache_model( @@ -267,6 +268,7 @@ def next_id(self): self.log_panel.print_info( self.tr("Potential referenced data found.") ) + self.schema_configuration_page.setComplete(True) return PageIds.ImportDataConfiguration else: self.log_panel.print_info( @@ -274,6 +276,7 @@ def next_id(self): "No models, no transfer files and no potential referenced data found. Nothing to do." ) ) + self.schema_configuration_page.setComplete(True) if self.current_id == PageIds.ImportSchemaExecution: # if transfer file available or possible (by getting via UsabILIty Hub) @@ -282,6 +285,7 @@ def next_id(self): "Checking for potential referenced data on the repositories (might take a while)..." ) ) + self.import_schema_execution_page.setComplete(False) if ( self.import_data_file_model.rowCount() or self.update_referecedata_cache_model( @@ -292,7 +296,9 @@ def next_id(self): self.log_panel.print_info( self.tr("Potential referenced data found.") ) + self.import_schema_execution_page.setComplete(True) return PageIds.ImportDataConfiguration + self.import_schema_execution_page.setComplete(True) return PageIds.ProjectCreation if self.current_id == PageIds.ImportDataConfiguration: @@ -524,7 +530,7 @@ def update_referecedata_cache_model(self, filter_models, type): timer = QTimer() timer.setSingleShot(True) timer.timeout.connect(lambda: loop.quit()) - timer.start(10000) + timer.start(2000) self.refresh_referencedata_cache(filter_models, type) loop.exec() return self.ilireferencedatacache.model