diff --git a/lizmap/project_checker_tools.py b/lizmap/project_checker_tools.py index 3f583180..bf0dcfac 100644 --- a/lizmap/project_checker_tools.py +++ b/lizmap/project_checker_tools.py @@ -506,7 +506,7 @@ def duplicated_rule_key_legend(project: QgsProject) -> Dict[str, Dict[str, int]] return data -def duplicated_label_legend(project: QgsProject) -> Dict[str, list[str]]: +def duplicated_label_legend(project: QgsProject) -> Dict[str, List[str]]: """ Check for all duplicated labels in the legend, per layer. """ results = {} for layer in project.mapLayers().values(): @@ -517,12 +517,12 @@ def duplicated_label_legend(project: QgsProject) -> Dict[str, list[str]]: # From QGIS source code : # https://github.com/qgis/QGIS/blob/71499aacf431d3ac244c9b75c3d345bdc53572fb/src/core/symbology/qgsrendererregistry.cpp#L33 - if renderer.type() in ("categorizedSymbol", "RuleRenderer", "graduatedSymbol"): + if renderer.type() in ("RuleRenderer", ): results[layer.id()] = _duplicated_label_legend_layer(renderer) return results -def _duplicated_label_legend_layer(renderer: QgsFeatureRenderer) -> list[str]: +def _duplicated_label_legend_layer(renderer: QgsFeatureRenderer) -> List[str]: """ Check at the renderer level for the check above. """ # noinspection PyUnresolvedReferences root_rule = renderer.rootRule() diff --git a/lizmap/widgets/check_project.py b/lizmap/widgets/check_project.py index 31c92dd2..9ad61540 100644 --- a/lizmap/widgets/check_project.py +++ b/lizmap/widgets/check_project.py @@ -542,7 +542,7 @@ def __init__(self): 'duplicated_rule_key_label_legend', tr('The layer has some duplicated "label" in its legend'), tr( - "The layer should not have duplicated labels within its own legend. This is limitation on QGIS Server." + "The layer should not have duplicated labels within its own legend. This is a limitation on QGIS Server." ), ( '