skillcalc: only recompute xp bonus values once when bonus changes
This commit is contained in:
@@ -272,19 +272,15 @@ class SkillCalculator extends JPanel
|
||||
|
||||
private void adjustCheckboxes(JCheckBox target, SkillBonus bonus)
|
||||
{
|
||||
adjustXPBonus(0);
|
||||
bonusCheckBoxes.forEach(otherSelectedCheckbox ->
|
||||
for (JCheckBox otherSelectedCheckbox : bonusCheckBoxes)
|
||||
{
|
||||
if (otherSelectedCheckbox != target)
|
||||
{
|
||||
otherSelectedCheckbox.setSelected(false);
|
||||
}
|
||||
});
|
||||
|
||||
if (target.isSelected())
|
||||
{
|
||||
adjustXPBonus(bonus.getValue());
|
||||
}
|
||||
|
||||
adjustXPBonus(target.isSelected() ? bonus.getValue() : 0f);
|
||||
}
|
||||
|
||||
private void renderActionSlots()
|
||||
|
||||
Reference in New Issue
Block a user