fix: message 'field already exists' for non existent fields

This commit is contained in:
schdub
2017-01-26 16:03:21 +03:00
parent 8d8207043b
commit 0c10dbdd8d

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."));