From f8eadd61b07375a6aada36b2b4b2aa8c3423510e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 7 Feb 2018 16:47:26 +0000 Subject: [PATCH] JAL-2902 thread off dialog close op to avoid deadlock on the main swing thread. --- src/jalview/gui/StructureChooser.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 5de3082..198aa62 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -55,6 +55,7 @@ import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JTable; +import javax.swing.SwingUtilities; import javax.swing.table.AbstractTableModel; /** @@ -911,8 +912,15 @@ public class StructureChooser extends GStructureChooser new SequenceI[] { selectedSequence }); } - closeAction(preferredHeight); - mainFrame.dispose(); + SwingUtilities.invokeLater(new Runnable() + { + @Override + public void run() + { + closeAction(preferredHeight); + mainFrame.dispose(); + } + }); } }; Thread runner = new Thread(viewStruc); -- 1.7.10.2