Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[fix] Variables can't have spaces in name
  • Loading branch information
NathanW2 authored and nyalldawson committed May 28, 2018
1 parent 6441b64 commit cfdfa47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgsvariableeditorwidget.cpp
Expand Up @@ -719,6 +719,8 @@ void VariableEditorDelegate::setModelData( QWidget *widget, QAbstractItemModel *
{
//edited variable name
QString newName = lineEdit->text();
newName = newName.trimmed();
newName = newName.replace( QStringLiteral( " " ), "_" );

//test for validity
if ( newName == variableName )
Expand Down

0 comments on commit cfdfa47

Please sign in to comment.