Skip to content

Commit

Permalink
Merge pull request sqlitebrowser#947 from schdub/issue945
Browse files Browse the repository at this point in the history
fix: message 'field already exists' for non existent fields
  • Loading branch information
justinclift authored Jan 26, 2017
2 parents 8d82070 + 0c10dbd commit 28ddbc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EditTableDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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."));
Expand Down

0 comments on commit 28ddbc4

Please sign in to comment.