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)
|
private void adjustCheckboxes(JCheckBox target, SkillBonus bonus)
|
||||||
{
|
{
|
||||||
adjustXPBonus(0);
|
for (JCheckBox otherSelectedCheckbox : bonusCheckBoxes)
|
||||||
bonusCheckBoxes.forEach(otherSelectedCheckbox ->
|
|
||||||
{
|
{
|
||||||
if (otherSelectedCheckbox != target)
|
if (otherSelectedCheckbox != target)
|
||||||
{
|
{
|
||||||
otherSelectedCheckbox.setSelected(false);
|
otherSelectedCheckbox.setSelected(false);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
if (target.isSelected())
|
|
||||||
{
|
|
||||||
adjustXPBonus(bonus.getValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adjustXPBonus(target.isSelected() ? bonus.getValue() : 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderActionSlots()
|
private void renderActionSlots()
|
||||||
|
|||||||
Reference in New Issue
Block a user