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 c255823
Showing 1 changed file with 12 additions and 0 deletions.
@@ -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.