Skip to content

Commit

Permalink
Fixes #150 - EditActionsDialog: initialize unsavedProfile property fr…
Browse files Browse the repository at this point in the history
…om parent dialog
  • Loading branch information
bwRavencl committed Jan 1, 2024
1 parent 563addc commit 28bce67
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import de.bwravencl.controllerbuddy.input.action.annotation.ActionProperty;
import io.github.classgraph.ClassGraph;
import java.awt.BorderLayout;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
Expand Down Expand Up @@ -126,6 +125,9 @@ public final class EditActionsDialog extends JDialog {
private final JList<AvailableAction> availableActionsList = new JList<>();
private final JList<AssignedAction> assignedActionsList = new JList<>();

@SuppressWarnings({"serial", "RedundantSuppression"})
private final Profile unsavedProfile;

@SuppressWarnings({"serial", "RedundantSuppression"})
private Main main;

Expand All @@ -135,9 +137,6 @@ public final class EditActionsDialog extends JDialog {
@SuppressWarnings({"serial", "RedundantSuppression"})
private Input input;

@SuppressWarnings({"serial", "RedundantSuppression"})
private Profile unsavedProfile;

@SuppressWarnings({"serial", "RedundantSuppression"})
private ButtonToCycleAction cycleAction;

Expand All @@ -152,7 +151,7 @@ public final class EditActionsDialog extends JDialog {

@SuppressWarnings("unchecked")
public EditActionsDialog(
@SuppressWarnings("exports") final Dialog parentDialog,
@SuppressWarnings("exports") final EditActionsDialog parentDialog,
@SuppressWarnings("exports") final ButtonToCycleAction cycleAction) {
super(parentDialog);
this.cycleAction = cycleAction;
Expand All @@ -165,6 +164,8 @@ public EditActionsDialog(
throw new RuntimeException(e);
}

unsavedProfile = parentDialog.unsavedProfile;

preInit(parentDialog);
setTitle(MessageFormat.format(
Main.strings.getString("EDIT_ACTIONS_DIALOG_TITLE_CYCLE_ACTION_EDITOR"),
Expand Down

0 comments on commit 28bce67

Please sign in to comment.