mirror of https://github.com/zlatinb/muwire
fix collapsing of tree on refresh (as in during uploads). Fix magic expansion on clearing of filter
parent
4fcb82133c
commit
d5a17e9b6a
|
@ -1778,6 +1778,7 @@ class MainFrameView {
|
||||||
JTree tree = builder.getVariable("shared-files-tree")
|
JTree tree = builder.getVariable("shared-files-tree")
|
||||||
tree.setSelectionPaths(new TreePath[0])
|
tree.setSelectionPaths(new TreePath[0])
|
||||||
expansionListener.expandedPaths.clear()
|
expansionListener.expandedPaths.clear()
|
||||||
|
expansionListener.manualExpansion = false
|
||||||
JTable table = builder.getVariable("shared-files-table")
|
JTable table = builder.getVariable("shared-files-table")
|
||||||
table.selectionModel.clearSelection()
|
table.selectionModel.clearSelection()
|
||||||
}
|
}
|
||||||
|
@ -2006,10 +2007,8 @@ class MainFrameView {
|
||||||
|
|
||||||
void fullTreeExpansion() {
|
void fullTreeExpansion() {
|
||||||
JTree sharedFilesTree = builder.getVariable("shared-files-tree")
|
JTree sharedFilesTree = builder.getVariable("shared-files-tree")
|
||||||
sharedFilesTree.removeTreeExpansionListener(expansionListener)
|
|
||||||
for (int i = 0; i < sharedFilesTree.rowCount; i ++)
|
for (int i = 0; i < sharedFilesTree.rowCount; i ++)
|
||||||
sharedFilesTree.expandRow(i)
|
sharedFilesTree.expandRow(i)
|
||||||
sharedFilesTree.addTreeExpansionListener(expansionListener)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String formatSize(long size, String suffix) {
|
private static String formatSize(long size, String suffix) {
|
||||||
|
|
Loading…
Reference in New Issue