Skip to content
Permalink
Browse files

[composer] Avoid crash when atlas page name field has spaces

Fix #15297

(cherry-picked from 631b5e8)
  • Loading branch information
nyalldawson committed Jul 19, 2016
1 parent 5dabc9d commit 8f2eb817dd48dc1905000d94355a2c19c2bf354e
Showing with 6 additions and 2 deletions.
  1. +2 −1 src/app/composer/qgsatlascompositionwidget.cpp
  2. +4 −1 src/core/composer/qgsatlascomposition.cpp
@@ -271,8 +271,9 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString& expression, bool valid )
void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString&, bool valid )
{
QString expression = mPageNameWidget->asExpression();
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || ( !valid && !expression.isEmpty() ) )
{
@@ -220,7 +220,10 @@ int QgsAtlasComposition::updateFeatures()
{
nameExpression.reset( nullptr );
}
nameExpression->prepare( &expressionContext );
else
{
nameExpression->prepare( &expressionContext );
}
}

// We cannot use nextFeature() directly since the feature pointer is rewinded by the rendering process

0 comments on commit 8f2eb81

Please sign in to comment.
You can’t perform that action at this time.