Fix previous result not being cleared in hiscore plugin

This commit is contained in:
UniquePassive
2018-01-02 19:37:25 +01:00
parent e1d6d8f2f0
commit 2bdaf09b6b

View File

@@ -384,6 +384,11 @@ public class HiscorePanel extends PluginPanel
return; return;
} }
for (JLabel label : skillLabels)
{
label.setText("--");
}
try try
{ {
HiscoreEndpoint endpoint = HiscoreEndpoint.valueOf(endpointButtonGroup.getSelection().getActionCommand()); HiscoreEndpoint endpoint = HiscoreEndpoint.valueOf(endpointButtonGroup.getSelection().getActionCommand());
@@ -417,14 +422,6 @@ public class HiscorePanel extends PluginPanel
); );
label.setText(Integer.toString(combatLevel)); label.setText(Integer.toString(combatLevel));
} }
else
{
label.setText("--");
}
}
else if (result.getSkill(skill) == null)
{
label.setText("--");
} }
else if (result.getSkill(skill) != null && result.getSkill(skill).getRank() != -1) else if (result.getSkill(skill) != null && result.getSkill(skill).getRank() != -1)
{ {