Skip to content

Commit

Permalink
Merge pull request #126 from Solaris-Skunk-Werks/bugfix/clear-turret-…
Browse files Browse the repository at this point in the history
…selection

Correctly set turret selector when loading CVs
  • Loading branch information
WEKarnesky authored Mar 23, 2020
2 parents 8273787 + 58e0160 commit 415dd57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions saw/src/main/java/saw/gui/frmVee.java
Original file line number Diff line number Diff line change
Expand Up @@ -5637,7 +5637,6 @@ private void LoadSelections() {
private void BuildTurretSelector()
{
ArrayList list = new ArrayList();
String curTurret = cmbTurret.getSelectedItem().toString();

if ( !CurVee.IsOmni())
cmbTurret.setEnabled(true);
Expand All @@ -5659,8 +5658,12 @@ private void BuildTurretSelector()

// now set the turret chooser
cmbTurret.setModel( new javax.swing.DefaultComboBoxModel( temp ) );

cmbTurret.setSelectedItem(curTurret);
if (CurVee.isHasTurret2())
cmbTurret.setSelectedItem("Dual Turret");
else if (CurVee.isHasTurret1())
cmbTurret.setSelectedItem("Single Turret");
else
cmbTurret.setSelectedItem("No Turret");
}

private void BuildChassisSelector()
Expand Down
9 changes: 6 additions & 3 deletions saw/src/main/java/saw/gui/frmVeeWide.java
Original file line number Diff line number Diff line change
Expand Up @@ -5501,7 +5501,6 @@ private void LoadSelections() {
private void BuildTurretSelector()
{
ArrayList list = new ArrayList();
String curTurret = cmbTurret.getSelectedItem().toString();

if ( !CurVee.IsOmni())
cmbTurret.setEnabled(true);
Expand All @@ -5523,8 +5522,12 @@ private void BuildTurretSelector()

// now set the turret chooser
cmbTurret.setModel( new javax.swing.DefaultComboBoxModel( temp ) );

cmbTurret.setSelectedItem(curTurret);
if (CurVee.isHasTurret2())
cmbTurret.setSelectedItem("Dual Turret");
else if (CurVee.isHasTurret1())
cmbTurret.setSelectedItem("Single Turret");
else
cmbTurret.setSelectedItem("No Turret");
}

private void BuildChassisSelector()
Expand Down

0 comments on commit 415dd57

Please sign in to comment.