From aabce6bab2e703d713aa19369a51275ec86f03bf Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 28 Jan 2018 12:48:25 +0100 Subject: [PATCH] Fix selection after delete/undelete --- src/bitmessageqt/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 65b9f5db..ff44bdd4 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3000,6 +3000,7 @@ class MyForm(settingsmixin.SMainWindow): if inventoryHashToTrash in inventoryHashesToTrash: continue inventoryHashesToTrash.append(inventoryHashToTrash) + currentRow = r.topRow() tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1) idCount = len(inventoryHashesToTrash) if folder == "trash" or shifted: @@ -3030,6 +3031,7 @@ class MyForm(settingsmixin.SMainWindow): if inventoryHashToTrash in inventoryHashesToTrash: continue inventoryHashesToTrash.append(inventoryHashToTrash) + currentRow = r.topRow() tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1) if currentRow == 0: tableWidget.selectRow(currentRow)