Skip to content

Commit

Permalink
Fixing MekHQ dialog names
Browse files Browse the repository at this point in the history
  • Loading branch information
Windchild292 committed Dec 13, 2020
1 parent 03ffd7d commit 57947db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import javax.swing.*;
import javax.swing.event.MouseInputAdapter;

import megamek.client.ui.swing.dialog.imageChooser.AbstractIconChooser;
import megamek.client.ui.swing.dialog.imageChooser.PortraitChooser;
import megamek.client.ui.swing.dialog.imageChooser.AbstractIconChooserDialog;
import megamek.client.ui.swing.dialog.imageChooser.PortraitChooserDialog;
import megamek.client.ui.swing.util.MenuScroller;
import megamek.common.*;
import megamek.common.options.IOption;
Expand Down Expand Up @@ -793,7 +793,7 @@ public void actionPerformed(ActionEvent action) {
break;
}
case CMD_EDIT_PORTRAIT: {
AbstractIconChooser portraitDialog = new PortraitChooser(gui.getFrame(),
AbstractIconChooserDialog portraitDialog = new PortraitChooserDialog(gui.getFrame(),
selectedPerson.getPortrait());
int result = portraitDialog.showDialog();
if ((result == JOptionPane.OK_OPTION) && (portraitDialog.getSelectedItem() != null)) {
Expand Down
11 changes: 4 additions & 7 deletions MekHQ/src/mekhq/gui/dialog/NewRecruitDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
import javax.swing.*;

import megamek.client.generator.RandomNameGenerator;
import megamek.client.ui.swing.dialog.imageChooser.AbstractIconChooser;
import megamek.client.ui.swing.dialog.imageChooser.PortraitChooser;
import megamek.client.ui.swing.dialog.imageChooser.AbstractIconChooserDialog;
import megamek.client.ui.swing.dialog.imageChooser.PortraitChooserDialog;
import megamek.common.enums.Gender;
import megamek.common.util.EncodeControl;
import mekhq.MHQStaticDirectoryManager;
import mekhq.MekHQ;
import mekhq.campaign.personnel.Person;
import mekhq.campaign.personnel.Ranks;
Expand All @@ -37,17 +36,15 @@
import mekhq.preferences.PreferencesNode;

public class NewRecruitDialog extends javax.swing.JDialog {

/**
* This dialog is used to both hire new pilots and to edit existing ones
*
*/
private static final long serialVersionUID = -6265589976779860566L;
private Person person;

private CampaignGUI hqView;

private javax.swing.JComboBox<String> choiceRanks;
private JComboBox<String> choiceRanks;

private JScrollPane scrollView;

Expand Down Expand Up @@ -231,7 +228,7 @@ private void randomOrigin() {
}

private void choosePortrait() {
AbstractIconChooser portraitDialog = new PortraitChooser(hqView.getFrame(), person.getPortrait());
AbstractIconChooserDialog portraitDialog = new PortraitChooserDialog(hqView.getFrame(), person.getPortrait());
int result = portraitDialog.showDialog();
if ((result == JOptionPane.OK_OPTION) && (portraitDialog.getSelectedItem() != null)) {
person.setPortrait(portraitDialog.getSelectedItem());
Expand Down

0 comments on commit 57947db

Please sign in to comment.