Skip to content

Commit d61c536

Browse files
committedJun 18, 2014
[composer] Fix setting atlas filename pattern from expression dialog (fix #10628)
1 parent 6d6eede commit d61c536

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
 

‎src/app/composer/qgsatlascompositionwidget.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,18 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
123123
QString expression = exprDlg.expressionText();
124124
if ( !expression.isEmpty() )
125125
{
126-
// will emit a textChanged signal
126+
//set atlas filename expression
127127
mAtlasFilenamePatternEdit->setText( expression );
128+
if ( ! atlasMap->setFilenamePattern( expression ) )
129+
{
130+
//expression could not be set
131+
QMessageBox::warning( this
132+
, tr( "Could not evaluate filename pattern" )
133+
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
134+
.arg( expression )
135+
.arg( atlasMap->filenamePatternErrorString() )
136+
);
137+
}
128138
}
129139
}
130140
}

0 commit comments

Comments
 (0)
Please sign in to comment.