Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdesbas committed Jan 12, 2024
1 parent 145a6f6 commit b8cce67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugin/idg/gui/dlg_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def apply(self):
items = {c.idg_id : c.url for c in RemotePlatforms(read_projects=False).plateforms if not c.is_hidden()}
registry = QgsApplication.instance().dataItemProviderRegistry()
provider = registry.provider(IdgProvider().name())
task = DownloadAllConfigFilesAsync(items) # Download non-hidden idg
task.finished.connect(provider.root.refresh)
task.start()
self.task = DownloadAllConfigFilesAsync(items) # Download non-hidden idg
self.task.finished.connect(provider.root.refresh)
self.task.start()
if __debug__:
self.log(
message="DEBUG - Settings successfully saved.",
Expand Down Expand Up @@ -176,8 +176,8 @@ def reset_settings(self):
# dump default settings into QgsSettings
self.plg_settings.save_from_object(default_settings)
self.load_settings()
provider = QgsApplication.dataItemProviderRegistry().provider("IDG Provider")
provider.root.repopulate()
provider = QgsApplication.instance().dataItemProviderRegistry().provider("IDG Provider")
provider.root.refresh()


class PlgOptionsFactory(QgsOptionsWidgetFactory):
Expand Down

0 comments on commit b8cce67

Please sign in to comment.