Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
public class ClassSelectorClassNode extends SortedMutableTreeNode {
private final ClassEntry obfEntry;
private ClassEntry deobfEntry;
private boolean updatePending;

public ClassSelectorClassNode(ClassEntry obfEntry, ClassEntry deobfEntry) {
super(Comparator.comparing(TreeNode::toString));
Expand All @@ -42,6 +43,12 @@ public ClassEntry getDeobfEntry() {
* @param updateIfPresent whether to update the stats if they have already been generated for this node
*/
public void reloadStats(Gui gui, ClassSelector selector, boolean updateIfPresent) {
if (this.updatePending) {
return;
}

this.updatePending = true;

StatsGenerator generator = gui.getController().getStatsGenerator();

SwingWorker<ClassSelectorClassNode, Void> iconUpdateWorker = new SwingWorker<>() {
Expand All @@ -66,6 +73,7 @@ public void done() {
}

SwingUtilities.invokeLater(() -> selector.reload(ClassSelectorClassNode.this, false));
ClassSelectorClassNode.this.updatePending = false;
}
};

Expand Down