File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
tmc-plugin/src/fi/helsinki/cs/tmc/ui Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ public void showPreferencesDialog(final ActionListener dialogListener) {
8585 ActionListener closeListener = new ActionListener () {
8686 @ Override
8787 public void actionPerformed (ActionEvent e ) {
88- panel = null ;
89- dialog = null ;
88+ destroyDialog ();
9089 dialogListener .actionPerformed (e );
9190 }
9291 };
@@ -102,8 +101,7 @@ public void actionPerformed(ActionEvent e) {
102101 dialog .addWindowListener (new WindowAdapter () {
103102 @ Override
104103 public void windowClosed (WindowEvent we ) {
105- panel = null ;
106- dialog = null ;
104+ destroyDialog ();
107105 }
108106 });
109107 SwingUtilities .invokeLater (new Runnable () {
@@ -113,4 +111,9 @@ public void run() {
113111 }
114112 });
115113 }
114+
115+ private void destroyDialog () {
116+ panel = null ;
117+ dialog = null ;
118+ }
116119}
You can’t perform that action at this time.
0 commit comments