From 7b2d37b48728771677b3211582296eeed5a48597 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Tue, 8 Jun 2021 09:27:07 +0200 Subject: [PATCH] Better wording for setLayers documentation --- python/core/auto_generated/layout/qgslayoutitemmap.sip.in | 8 +++++--- src/core/layout/qgslayoutitemmap.h | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/python/core/auto_generated/layout/qgslayoutitemmap.sip.in b/python/core/auto_generated/layout/qgslayoutitemmap.sip.in index e5143953c9a4..36af3b3372f9 100644 --- a/python/core/auto_generated/layout/qgslayoutitemmap.sip.in +++ b/python/core/auto_generated/layout/qgslayoutitemmap.sip.in @@ -508,15 +508,17 @@ be used instead. void setLayers( const QList &layers ); %Docstring -Sets the stored ``layers`` set. If empty, the current project layers or the -layer specified in the map theme (if the follow visibility preset flag is set) -will be used instead. +Sets the stored ``layers`` set. If empty, the current project layers will be used. +If the map item is set to follow a map theme (via :py:func:`~QgsLayoutItemMap.followVisibilityPreset` and :py:func:`~QgsLayoutItemMap.followVisibilityPresetName` ), +then this method will have no effect and the layers rendered in the map will always follow the map theme. .. seealso:: :py:func:`layers` .. seealso:: :py:func:`keepLayerSet` .. seealso:: :py:func:`followVisibilityPreset` + +.. seealso:: :py:func:`followVisibilityPresetName` %End bool keepLayerStyles() const; diff --git a/src/core/layout/qgslayoutitemmap.h b/src/core/layout/qgslayoutitemmap.h index 5b8e6dd08390..d1bb00f279cc 100644 --- a/src/core/layout/qgslayoutitemmap.h +++ b/src/core/layout/qgslayoutitemmap.h @@ -513,12 +513,13 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem, public QgsTemporalRan QList layers() const; /** - * Sets the stored \a layers set. If empty, the current project layers or the - * layer specified in the map theme (if the follow visibility preset flag is set) - * will be used instead. + * Sets the stored \a layers set. If empty, the current project layers will be used. + * If the map item is set to follow a map theme (via followVisibilityPreset() and followVisibilityPresetName() ), + * then this method will have no effect and the layers rendered in the map will always follow the map theme. * \see layers() * \see keepLayerSet() * \see followVisibilityPreset() + * \see followVisibilityPresetName() */ void setLayers( const QList &layers );