Fix selection after delete/undelete
This commit is contained in:
parent
08ac8a077b
commit
aabce6bab2
|
@ -3000,6 +3000,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
if inventoryHashToTrash in inventoryHashesToTrash:
|
if inventoryHashToTrash in inventoryHashesToTrash:
|
||||||
continue
|
continue
|
||||||
inventoryHashesToTrash.append(inventoryHashToTrash)
|
inventoryHashesToTrash.append(inventoryHashToTrash)
|
||||||
|
currentRow = r.topRow()
|
||||||
tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
|
tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
|
||||||
idCount = len(inventoryHashesToTrash)
|
idCount = len(inventoryHashesToTrash)
|
||||||
if folder == "trash" or shifted:
|
if folder == "trash" or shifted:
|
||||||
|
@ -3030,6 +3031,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
if inventoryHashToTrash in inventoryHashesToTrash:
|
if inventoryHashToTrash in inventoryHashesToTrash:
|
||||||
continue
|
continue
|
||||||
inventoryHashesToTrash.append(inventoryHashToTrash)
|
inventoryHashesToTrash.append(inventoryHashToTrash)
|
||||||
|
currentRow = r.topRow()
|
||||||
tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
|
tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
|
||||||
if currentRow == 0:
|
if currentRow == 0:
|
||||||
tableWidget.selectRow(currentRow)
|
tableWidget.selectRow(currentRow)
|
||||||
|
|
Reference in New Issue
Block a user