Skip to content

Commit cfdfa47

Browse files
NathanW2nyalldawson
authored andcommitted
[fix] Variables can't have spaces in name
1 parent 6441b64 commit cfdfa47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gui/qgsvariableeditorwidget.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ void VariableEditorDelegate::setModelData( QWidget *widget, QAbstractItemModel *
719719
{
720720
//edited variable name
721721
QString newName = lineEdit->text();
722+
newName = newName.trimmed();
723+
newName = newName.replace( QStringLiteral( " " ), "_" );
722724

723725
//test for validity
724726
if ( newName == variableName )

0 commit comments

Comments
 (0)