skillcalculator: Use equals when comparing objects

This commit is contained in:
sdburns1998
2019-07-07 18:41:12 +02:00
parent 5da11e22ec
commit ee776e3f0d
3 changed files with 3 additions and 3 deletions

View File

@@ -438,7 +438,7 @@ public class BankedCalculator extends JPanel
{
// This is triggered on every click so don't update if activity didn't actually change
Activity cur = activityMap.get(i);
if (cur == a)
if (cur != null && cur.equals(a))
{
return;
}

View File

@@ -270,7 +270,7 @@ class SkillCalculator extends JPanel
for (JCheckBox checkBox : uiCheckBoxList)
{
if (checkBox != uiCheckBox)
if (checkBox != null && !checkBox.equals(uiCheckBox))
{
checkBox.setSelected(false);
}

View File

@@ -123,7 +123,7 @@ class SkillCalculatorPanel extends PluginPanel
MaterialTab tab = new MaterialTab(icon, skillGroup, null);
tab.setOnSelectEvent(() ->
{
if (currentCalc == calculatorType)
if (currentCalc != null && currentCalc.equals(calculatorType))
{
return true;
}