Skip to content

Commit

Permalink
Merge pull request #1614 from SJuliez/fix-tech-level
Browse files Browse the repository at this point in the history
Quick for tech level parsing
  • Loading branch information
SJuliez authored Sep 15, 2024
2 parents ef7ef44 + 89a4e2f commit d11011e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions megameklab/src/megameklab/ui/generalUnit/BasicInfoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void setTechBase(boolean clan, boolean mixed) {
@Override
public SimpleTechLevel getTechLevel() {
try {
return SimpleTechLevel.valueOf((String) cbTechLevel.getSelectedItem());
return SimpleTechLevel.valueOf(((String) cbTechLevel.getSelectedItem()).toUpperCase());
} catch (Exception e) {
return SimpleTechLevel.STANDARD;
}
Expand Down Expand Up @@ -495,9 +495,9 @@ private void refreshTechLevel() {
}
cbTechLevel.addItem(SimpleTechLevel.EXPERIMENTAL.toString());
cbTechLevel.addItem(SimpleTechLevel.UNOFFICIAL.toString());
cbTechLevel.setSelectedItem(prev);
cbTechLevel.setSelectedItem(prev.toString());
cbTechLevel.addActionListener(this);
if ((cbTechLevel.getSelectedItem() == null) || (cbTechLevel.getSelectedItem().equals(prev.toString()))) {
if ((cbTechLevel.getSelectedItem() == null) || (!cbTechLevel.getSelectedItem().equals(prev.toString()))) {
cbTechLevel.setSelectedIndex(0);
}
}
Expand Down

0 comments on commit d11011e

Please sign in to comment.