From 0c10dbdd8ddf8e9c3568f923f9f5226c725789aa Mon Sep 17 00:00:00 2001 From: schdub Date: Thu, 26 Jan 2017 16:03:21 +0300 Subject: [PATCH] fix: message 'field already exists' for non existent fields --- src/EditTableDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditTableDialog.cpp b/src/EditTableDialog.cpp index fa2461a1..4915c1c5 100644 --- a/src/EditTableDialog.cpp +++ b/src/EditTableDialog.cpp @@ -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."));