[composer] Fix setting atlas filename pattern from expression dialog (fix #10628)

This commit is contained in:
Nyall Dawson 2014-06-19 07:33:11 +10:00
parent 6d6eede498
commit d61c5361ce

View File

@ -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() )
);
}
}
}
}