Skip to content

Commit

Permalink
fix preference acces
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdesbas committed Apr 13, 2023
1 parent 961e2b2 commit 4953a3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions plugin/idg/plugin_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def __init__(self, iface: QgisInterface):

# Read the resources tree file and update the GUI
#self.ressources_tree = TreeNodeFactory(PluginGlobals.instance().config_file_path).root_node # dev

download_all_config_files(PlgOptionsManager().get_value_from_key('idgs').split(','))
download_all_config_files(PlgOptionsManager().get_plg_settings().idgs.split(','))

def need_download_tree_config_file(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion plugin/idg/toolbelt/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def menus(self, parent):

def createChildren(self):
children = []
for idg_id, url in enumerate(PlgOptionsManager().get_value_from_key('idgs').split(',')):
for idg_id, url in enumerate(PlgOptionsManager().get_plg_settings().idgs.split(',')):
idg_id = str(idg_id)
suffix = os.path.splitext(os.path.basename(url))[-1]
local_file_name = os.path.join(PluginGlobals.instance().config_dir_path, idg_id + suffix)
Expand Down
2 changes: 1 addition & 1 deletion plugin/idg/toolbelt/plugin_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PluginGlobals:
CONFIG_FILE_NAMES = ["projet_idg.qgs"]
CONFIG_FILE_URLS = ["http://127.0.0.1:8000/projet_idg.qgs"]

IDGS = PlgOptionsManager().get_value_from_key('idgs').split(',')
IDGS = PlgOptionsManager().get_plg_settings().idgs.split(',')

# Hide resources with status = warn
HIDE_RESOURCES_WITH_WARN_STATUS = PlgOptionsManager().get_value_from_key('hide_resources_with_warn_status')
Expand Down

0 comments on commit 4953a3e

Please sign in to comment.