Skip to content
Permalink
Browse files

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

Fix #15297
  • Loading branch information
nyalldawson committed Jul 18, 2016
1 parent 9f330fc commit 631b5e87c3d4d72b80e6087c48caf7d73a477213
Showing with 6 additions and 2 deletions.
  1. +2 −1 src/app/composer/qgsatlascompositionwidget.cpp
  2. +4 −1 src/core/composer/qgsatlascomposition.cpp
@@ -272,8 +272,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() ) )
{
@@ -222,7 +222,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 631b5e8

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