Merge pull request #947 from schdub/issue945

fix: message 'field already exists' for non existent fields
This commit is contained in:
Justin Clift
2017-01-26 16:15:56 +00:00
committed by GitHub

View File

@@ -257,7 +257,7 @@ void EditTableDialog::itemChanged(QTreeWidgetItem *item, int column)
{
case kName:
// When a field of that name already exists, show a warning to the user and don't apply the new name
if(m_table.findField(item->text(column)))
if(m_table.findField(item->text(column)) != -1)
{
QMessageBox::warning(this, qApp->applicationName(), tr("There already is a field with that name. Please rename it first or choose a different "
"name for this field."));