Skip to content

Commit

Permalink
Add warning note to QgsLayoutPageCollection::shouldExportPage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 28, 2018
1 parent 5cf3396 commit e552ce6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ Returns a list of layout items on the specified ``page`` index.
%Docstring
Returns whether the specified ``page`` number should be included in exports of the layouts.

.. warning::

This will always return true unless the layout is being currently exported -- it cannot
be used in advance to determine whether a given page will be exported!

.. seealso:: :py:func:`pageIsEmpty`
%End

Expand Down
4 changes: 4 additions & 0 deletions src/core/layout/qgslayoutpagecollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ class CORE_EXPORT QgsLayoutPageCollection : public QObject, public QgsLayoutSeri

/**
* Returns whether the specified \a page number should be included in exports of the layouts.
*
* \warning This will always return true unless the layout is being currently exported -- it cannot
* be used in advance to determine whether a given page will be exported!
*
* \see pageIsEmpty()
*/
bool shouldExportPage( int page ) const;
Expand Down

0 comments on commit e552ce6

Please sign in to comment.