Skip to content
Permalink
Browse files

Sanity checks in add attribute dialog

  • Loading branch information
m-kuhn committed Jul 24, 2014
1 parent 302b2ae commit c2558232685862311b83b621fff1c260930167ac
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/app/qgsaddattrdialog.cpp
@@ -113,6 +113,18 @@ void QgsAddAttrDialog::accept()
tr( "Invalid field name. This field name is reserved and cannot be used." ) );
return;
}
if ( mNameEdit->text().isEmpty() )
{
QMessageBox::warning( this, tr( "Warning" ),
tr( "No name specified. Please specify a name to create a new field." ) );
return;
}
if ( mButtonVirtualField->isChecked() && mExpressionWidget->currentField().isEmpty() )
{
QMessageBox::warning( this, tr( "Warning" ),
tr( "No expression specified. Please enter an expression that will be used to calculate the field values." ) );
return;
}
QDialog::accept();
}

0 comments on commit c255823

Please sign in to comment.
You can’t perform that action at this time.