Skip to content

Commit

Permalink
suspend actionlistener for role selector
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Jan 13, 2024
1 parent e184307 commit 47e2e8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions megameklab/src/megameklab/ui/generalUnit/BasicInfoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,15 @@ public void setFromEntity(Entity en) {
if (en.getManualBV() >= 0) {
setManualBV(en.getManualBV());
}
cbRole.removeActionListener(this);
cbRole.removeAllItems();
for (UnitRole role : UnitRole.values()) {
if (role.isAvailableTo(en)) {
cbRole.addItem(role);
}
}
cbRole.setSelectedItem(en.getRole());
cbRole.addActionListener(this);

refreshFaction();
}
Expand Down

0 comments on commit 47e2e8a

Please sign in to comment.