Skip to content

Commit

Permalink
Merge pull request #810 from opengisch/referenceDataProblem
Browse files Browse the repository at this point in the history
Deactivate next button while searching for referenceData
  • Loading branch information
signedav authored Jun 22, 2023
2 parents b094f9b + 5a2ef39 commit 6224c4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion QgisModelBaker/gui/topping_wizard/referencedata_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion QgisModelBaker/gui/workflow_wizard/workflow_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -267,13 +268,15 @@ 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(
self.tr(
"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)
Expand All @@ -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(
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6224c4b

Please sign in to comment.