From 4ed7a6a2d99244745fb3db10e264097e64c9dc17 Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Fri, 23 Jun 2023 10:08:03 +0200 Subject: [PATCH] CFG - Remove some unused keys about serverFrame and popupFrame --- lizmap/lizmap_api/config.py | 6 ++++++ lizmap/plugin.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lizmap/lizmap_api/config.py b/lizmap/lizmap_api/config.py index f23dc23c..1a7e9a96 100755 --- a/lizmap/lizmap_api/config.py +++ b/lizmap/lizmap_api/config.py @@ -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': { @@ -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': { diff --git a/lizmap/plugin.py b/lizmap/plugin.py index 1cd2d231..595dbf1e 100755 --- a/lizmap/plugin.py +++ b/lizmap/plugin.py @@ -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