Skip to content

Commit

Permalink
Disable signals for checking the API key when reading the CFG file fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Aug 21, 2023
1 parent da32688 commit a925257
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2092,8 +2092,6 @@ def populate_layer_tree(self) -> dict:
Needs to be refactored.
"""
self.dlg.block_signals_address(True)

self.dlg.layer_tree.clear()
self.myDic = {}

Expand All @@ -2107,7 +2105,6 @@ def populate_layer_tree(self) -> dict:
# Add the self.myDic to the global layerList dictionary
self.layerList = self.myDic

self.dlg.block_signals_address(False)
self.enable_check_box_in_layer_tab(False)

# The return is used in tests
Expand Down Expand Up @@ -3752,9 +3749,16 @@ def run(self) -> bool:

self.dlg.show()

# Reading the CFG will trigger signals with input text and the plugin will check the validity
# We do not that.
# https://github.com/3liz/lizmap-plugin/issues/513
self.dlg.block_signals_address(True)

# Get config file data
self.read_cfg_file()

self.dlg.block_signals_address(False)

auto_save = QgsSettings().value('lizmap/auto_save_project', False, bool)
self.dlg.checkbox_save_project.setChecked(auto_save)

Expand Down

0 comments on commit a925257

Please sign in to comment.