blacklist rendering edit fix
Editing of blacklist labels affected the rerendering, because it emits the changed signal too, and it caused an exception because the address field was missing at that time. This works around both.
This commit is contained in:
parent
2f6c36cab2
commit
d2b9c16d5f
|
@ -3977,6 +3977,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
def tableWidgetBlacklistItemChanged(self, item):
|
def tableWidgetBlacklistItemChanged(self, item):
|
||||||
if item.column() == 0:
|
if item.column() == 0:
|
||||||
addressitem = self.ui.tableWidgetBlacklist.item(item.row(), 1)
|
addressitem = self.ui.tableWidgetBlacklist.item(item.row(), 1)
|
||||||
|
if isinstance(addressitem, QTableWidgetItem):
|
||||||
if self.ui.radioButtonBlacklist.isChecked():
|
if self.ui.radioButtonBlacklist.isChecked():
|
||||||
sqlExecute('''UPDATE blacklist SET label=? WHERE address=?''',
|
sqlExecute('''UPDATE blacklist SET label=? WHERE address=?''',
|
||||||
str(item.text()), str(addressitem.text()))
|
str(item.text()), str(addressitem.text()))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user