Skip to content

Commit

Permalink
Better wording for setLayers documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and github-actions[bot] committed Jun 9, 2021
1 parent 749e903 commit 7b2d37b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions python/core/auto_generated/layout/qgslayoutitemmap.sip.in
Expand Up @@ -508,15 +508,17 @@ be used instead.

void setLayers( const QList<QgsMapLayer *> &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;
Expand Down
7 changes: 4 additions & 3 deletions src/core/layout/qgslayoutitemmap.h
Expand Up @@ -513,12 +513,13 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem, public QgsTemporalRan
QList<QgsMapLayer *> 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<QgsMapLayer *> &layers );

Expand Down

0 comments on commit 7b2d37b

Please sign in to comment.