Skip to content

Commit

Permalink
Merge pull request #772 from opengisch/speedup
Browse files Browse the repository at this point in the history
only check repo again for toppings when model list diverts
  • Loading branch information
signedav authored Dec 22, 2022
2 parents 2806477 + f1e8e1b commit 0a01b57
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 0a01b57

Please sign in to comment.