From 15a0eda713ca405ec251fbe731a2ed92f7b566b4 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 1 Jun 2019 17:09:23 +0100 Subject: [PATCH] preserve selection in downloads table --- gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy b/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy index 6a3c5f3a..8f7c3daf 100644 --- a/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy +++ b/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy @@ -74,8 +74,12 @@ class MainFrameModel { runInsideUIAsync { if (!mvcGroup.alive) return - builder.getVariable("downloads-table")?.model.fireTableDataChanged() builder.getVariable("uploads-table")?.model.fireTableDataChanged() + + def downloadTable = builder.getVariable("downloads-table") + int selectedRow = downloadTable.getSelectedRow() + downloadTable.model.fireTableDataChanged() + downloadTable.selectionModel.setSelectionInterval(selectedRow,selectedRow) } }, 1000, 1000) }