From b8ce4f79ac67884550d031731b38a01769c13899 Mon Sep 17 00:00:00 2001 From: Robert Colton Date: Wed, 14 Mar 2018 23:47:57 -0400 Subject: [PATCH] Fix ENIGMA Plugin Compatibility (#358) Make the Listener's file chooser public and non-static again. --- org/lateralgm/main/LGM.java | 4 ++-- org/lateralgm/main/Listener.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/org/lateralgm/main/LGM.java b/org/lateralgm/main/LGM.java index f927ac22e..5b18dc294 100644 --- a/org/lateralgm/main/LGM.java +++ b/org/lateralgm/main/LGM.java @@ -134,7 +134,7 @@ public final class LGM { - public static final String version = "1.8.37"; //$NON-NLS-1$ + public static final String version = "1.8.38"; //$NON-NLS-1$ // TODO: This list holds the class loader for any loaded plugins which should be // cleaned up and closed when the application closes. @@ -1329,7 +1329,7 @@ public static void onMainFrameClosed() switch (result) { case JOptionPane.YES_OPTION: - Listener.fc.save(LGM.currentFile.uri,LGM.currentFile.format); + Listener.getInstance().fc.save(LGM.currentFile.uri,LGM.currentFile.format); case JOptionPane.NO_OPTION: System.exit(0); break; diff --git a/org/lateralgm/main/Listener.java b/org/lateralgm/main/Listener.java index 01a847c7f..21688350d 100644 --- a/org/lateralgm/main/Listener.java +++ b/org/lateralgm/main/Listener.java @@ -64,8 +64,9 @@ public class Listener extends TransferHandler implements ActionListener,CellEditorListener { private static final long serialVersionUID = 1L; + MListener mListener = new MListener(); - static FileChooser fc = new FileChooser(); + public FileChooser fc = new FileChooser(); private Listener() {