Skip to content

Commit

Permalink
[composer] Fix setting atlas filename pattern from expression dialog (f…
Browse files Browse the repository at this point in the history
…ix #10628)
  • Loading branch information
nyalldawson committed Jun 18, 2014
1 parent 6d6eede commit d61c536
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/composer/qgsatlascompositionwidget.cpp
Expand Up @@ -123,8 +123,18 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
QString expression = exprDlg.expressionText();
if ( !expression.isEmpty() )
{
// will emit a textChanged signal
//set atlas filename expression
mAtlasFilenamePatternEdit->setText( expression );
if ( ! atlasMap->setFilenamePattern( expression ) )
{
//expression could not be set
QMessageBox::warning( this
, tr( "Could not evaluate filename pattern" )
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
.arg( expression )
.arg( atlasMap->filenamePatternErrorString() )
);
}
}
}
}
Expand Down

0 comments on commit d61c536

Please sign in to comment.