Skip to content

Commit

Permalink
CFG - Remove some unused keys about serverFrame and popupFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jun 23, 2023
1 parent d30bf72 commit 4ed7a6a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lizmap/lizmap_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ def __init__(self, project, fix_json=False):
'wType': 'checkbox', 'type': 'boolean', 'default': False, 'children': 'popupFrame'
},
'popupFrame': {
'comment': (
'This is not included in the CFG, I think it is used only because of parent/children, todo clean'
),
'wType': 'frame', 'type': None, 'default': None, 'parent': 'popup'
},
'popupSource': {
Expand Down Expand Up @@ -410,6 +413,9 @@ def __init__(self, project, fix_json=False):
'wType': 'checkbox', 'type': 'boolean', 'default': False, 'children': 'serverFrame', 'parent': 'singleTile'
},
'serverFrame': {
'comment': (
'This is not included in the CFG, I think it is used only because of parent/children, todo clean'
),
'wType': 'frame', 'type': None, 'default': None, 'parent': 'cached'
},
'cacheExpiration': {
Expand Down
6 changes: 6 additions & 0 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2848,6 +2848,12 @@ def project_config_file(self, lwc_version: LwcVersions, with_gui: bool = True, c
else:
layer_options['externalWmsToggle'] = str(False)

if 'serverFrame' in layer_options.keys():
del layer_options['serverFrame']

if 'popupFrame' in layer_options.keys():
del layer_options['popupFrame']

# Add layer options to the json object
liz2json["layers"][v['name']] = layer_options

Expand Down

0 comments on commit 4ed7a6a

Please sign in to comment.