loottracker: replace repaint calls with revalidate

This fixes removing panels from the logs container not correctly rebuilding the container to remove the space the box was previously in
This commit is contained in:
Adam
2022-03-13 17:00:14 -04:00
parent 08da9a2d8a
commit d8ba9b13ba
2 changed files with 4 additions and 6 deletions

View File

@@ -242,8 +242,7 @@ class LootTrackerBox extends JPanel
subTitleLabel.setToolTipText(QuantityFormatter.formatNumber(totalPrice / kills) + " gp (average)");
}
validate();
repaint();
revalidate();
}
void collapse()
@@ -368,7 +367,7 @@ class LootTrackerBox extends JPanel
itemContainer.add(slotContainer);
}
itemContainer.repaint();
itemContainer.revalidate();
}
private static String buildToolTip(LootTrackerItem item)

View File

@@ -331,7 +331,7 @@ class LootTrackerPanel extends PluginPanel
boxes.removeIf(b -> b.matches(currentView, currentType));
updateOverall();
logsContainer.removeAll();
logsContainer.repaint();
logsContainer.revalidate();
// Delete all loot, or loot matching the current view
if (currentView != null)
@@ -537,7 +537,6 @@ class LootTrackerPanel extends PluginPanel
boxes.forEach(LootTrackerBox::rebuild);
updateOverall();
logsContainer.revalidate();
logsContainer.repaint();
}
/**
@@ -638,7 +637,7 @@ class LootTrackerPanel extends PluginPanel
boxes.remove(box);
updateOverall();
logsContainer.remove(box);
logsContainer.repaint();
logsContainer.revalidate();
// Without loot being grouped we have no way to identify single kills to be deleted
if (groupLoot)