From f1e8e1b42a985adf71410b8ce7c3ee4862155cca Mon Sep 17 00:00:00 2001 From: signedav Date: Thu, 22 Dec 2022 12:26:02 +0100 Subject: [PATCH] only check repo again for toppings when model list diverts --- .../workflow_wizard/import_schema_configuration_page.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/QgisModelBaker/gui/workflow_wizard/import_schema_configuration_page.py b/QgisModelBaker/gui/workflow_wizard/import_schema_configuration_page.py index 0580a1421..a02809f8e 100644 --- a/QgisModelBaker/gui/workflow_wizard/import_schema_configuration_page.py +++ b/QgisModelBaker/gui/workflow_wizard/import_schema_configuration_page.py @@ -74,7 +74,7 @@ def __init__(self, parent, title): ) self.metaconfig_delegate = MetaConfigCompleterDelegate() self.metaconfig = configparser.ConfigParser() - self.current_models = None + self.current_models = [] self.current_metaconfig_id = None self.ili_metaconfig_line_edit.setPlaceholderText( self.tr("[Search metaconfig / topping from UsabILIty Hub]") @@ -159,9 +159,12 @@ def _update_models_dependent_info(self): - Calls update of ilimetaconfig cache to provide metaconfigurations - Calls update of ilireferencedata cache to load referenced """ - model_list_string = ", ".join(self.model_list_view.model().checked_models()) + model_list = self.model_list_view.model().checked_models() + if set(model_list) == set(self.current_models): + return + self.current_models = model_list for pattern, crs in CRS_PATTERNS.items(): - if re.search(pattern, model_list_string): + if re.search(pattern, ", ".join(model_list)): self.crs = QgsCoordinateReferenceSystem.fromEpsgId(int(crs)) self._update_crs_info() break