Add second binding to same word
This commit is contained in:
@@ -368,6 +368,9 @@ class EditDialog(QDialog, Ui_Dialog):
|
||||
#
|
||||
textBlock = self.paraEdit.document().findBlock(cursor.position())
|
||||
blockNum = textBlock.blockNumber()
|
||||
start = start - textBlock.position()
|
||||
end = end - textBlock.position()
|
||||
|
||||
query = QSqlQuery()
|
||||
query.prepare("SELECT * FROM words WHERE word = :word")
|
||||
query.bindValue(":word", word)
|
||||
@@ -395,8 +398,6 @@ class EditDialog(QDialog, Ui_Dialog):
|
||||
query.bindValue(":definition", json.dumps(definition))
|
||||
if not query.exec():
|
||||
query_error(query)
|
||||
start = start - textBlock.position()
|
||||
end = end - textBlock.position()
|
||||
self.defined(query.lastInsertId(), blockNum, start, end)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user