skillcalculator: Use equals when comparing objects
This commit is contained in:
@@ -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
|
// This is triggered on every click so don't update if activity didn't actually change
|
||||||
Activity cur = activityMap.get(i);
|
Activity cur = activityMap.get(i);
|
||||||
if (cur == a)
|
if (cur != null && cur.equals(a))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class SkillCalculator extends JPanel
|
|||||||
|
|
||||||
for (JCheckBox checkBox : uiCheckBoxList)
|
for (JCheckBox checkBox : uiCheckBoxList)
|
||||||
{
|
{
|
||||||
if (checkBox != uiCheckBox)
|
if (checkBox != null && !checkBox.equals(uiCheckBox))
|
||||||
{
|
{
|
||||||
checkBox.setSelected(false);
|
checkBox.setSelected(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class SkillCalculatorPanel extends PluginPanel
|
|||||||
MaterialTab tab = new MaterialTab(icon, skillGroup, null);
|
MaterialTab tab = new MaterialTab(icon, skillGroup, null);
|
||||||
tab.setOnSelectEvent(() ->
|
tab.setOnSelectEvent(() ->
|
||||||
{
|
{
|
||||||
if (currentCalc == calculatorType)
|
if (currentCalc != null && currentCalc.equals(calculatorType))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user