fix collapsing of tree on refresh (as in during uploads). Fix magic expansion on clearing of filter

pull/62/head
Zlatin Balevsky 2021-06-12 06:09:14 +01:00
parent 4fcb82133c
commit d5a17e9b6a
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 1 additions and 2 deletions

View File

@ -1778,6 +1778,7 @@ class MainFrameView {
JTree tree = builder.getVariable("shared-files-tree")
tree.setSelectionPaths(new TreePath[0])
expansionListener.expandedPaths.clear()
expansionListener.manualExpansion = false
JTable table = builder.getVariable("shared-files-table")
table.selectionModel.clearSelection()
}
@ -2006,10 +2007,8 @@ class MainFrameView {
void fullTreeExpansion() {
JTree sharedFilesTree = builder.getVariable("shared-files-tree")
sharedFilesTree.removeTreeExpansionListener(expansionListener)
for (int i = 0; i < sharedFilesTree.rowCount; i ++)
sharedFilesTree.expandRow(i)
sharedFilesTree.addTreeExpansionListener(expansionListener)
}
private static String formatSize(long size, String suffix) {