Skip to content

Commit

Permalink
only check repo again for toppings when model list diverts
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Dec 22, 2022
1 parent 4895ced commit f1e8e1b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f1e8e1b

Please sign in to comment.