From 657eeeb1ca6f5baccece899f0775924bf893bee6 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sun, 1 Nov 2015 10:09:04 +0100 Subject: [PATCH] Clear message lists better Fixes #71 --- src/bitmessageqt/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 2051d119..82139637 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -915,8 +915,7 @@ class MyForm(QtGui.QMainWindow): ORDER BY lastactiontime ''' % (where,) - while tableWidget.rowCount() > 0: - tableWidget.removeRow(0) + tableWidget.setRowCount(0) acct = None queryreturn = sqlQuery(sqlStatement, account, what) for row in queryreturn: @@ -1040,8 +1039,7 @@ class MyForm(QtGui.QMainWindow): ''' % (where) queryreturn = sqlQuery(sqlStatement, account, what) - while tableWidget.rowCount() > 0: - tableWidget.removeRow(0) + tableWidget.setRowCount(0) tableWidget.setColumnHidden(0, True) tableWidget.setColumnHidden(1, False)