mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[composer] Fix setting atlas filename pattern from expression dialog (fix #10628)
This commit is contained in:
parent
6d6eede498
commit
d61c5361ce
@ -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() )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user