Skip to content
Permalink
Browse files
Fix layout variable help text in qgsexpression.cpp
Help text for `@layout_pageheight` and `@layout_pagewidth` said value is in mm. That's true for predefined page sizes, but if you use a custom page size and specify it with different units (e.g. 11x17 inches for U.S. tabloid paper) these variables output in those units. Fixed help text to not mislead.
  • Loading branch information
Houska1 authored and nyalldawson committed Jul 15, 2021
1 parent 8350a1a commit dc338476c75807d4df3680cfd776c88f8885301d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/expression/qgsexpression.cpp
@@ -749,8 +749,8 @@ void QgsExpression::initVariableHelp()
sVariableHelpTexts()->insert( QStringLiteral( "layout_name" ), QCoreApplication::translate( "variable_help", "Name of composition." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_numpages" ), QCoreApplication::translate( "variable_help", "Number of pages in composition." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_page" ), QCoreApplication::translate( "variable_help", "Current page number in composition." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_pageheight" ), QCoreApplication::translate( "variable_help", "Composition page height in mm." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_pagewidth" ), QCoreApplication::translate( "variable_help", "Composition page width in mm." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_pageheight" ), QCoreApplication::translate( "variable_help", "Composition page height in mm (or specified custom units)." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_pagewidth" ), QCoreApplication::translate( "variable_help", "Composition page width in mm (or specified custom units)." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_pageoffsets" ), QCoreApplication::translate( "variable_help", "Array of Y coordinate of the top of each page." ) );
sVariableHelpTexts()->insert( QStringLiteral( "layout_dpi" ), QCoreApplication::translate( "variable_help", "Composition resolution (DPI)." ) );

0 comments on commit dc33847

Please sign in to comment.