From: gmungoc Date: Mon, 7 Nov 2016 11:01:22 +0000 (+0000) Subject: JAL-2295 handle no progress bar message properly X-Git-Tag: Release_2_11_0~62^2~72 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e8276f5598621d3f7e19c6bdbc49276706322c43;p=jalview.git JAL-2295 handle no progress bar message properly --- diff --git a/src/jalview/gui/JalviewChimeraBindingModel.java b/src/jalview/gui/JalviewChimeraBindingModel.java index 7a54732..ec30e7f 100644 --- a/src/jalview/gui/JalviewChimeraBindingModel.java +++ b/src/jalview/gui/JalviewChimeraBindingModel.java @@ -72,6 +72,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding { javax.swing.SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { cvf.updateTitleAndMenus(); @@ -80,6 +81,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding }); } + @Override public void updateColours(Object source) { AlignmentPanel ap = (AlignmentPanel) source; @@ -113,6 +115,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding * Send an asynchronous command to Chimera, in a new thread, optionally with * an 'in progress' message in a progress bar somewhere */ + @Override protected void sendAsynchronousCommand(final String command, final String progressMsg) { @@ -122,13 +125,20 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding @Override public void run() { - long stm = cvf.startProgressBar(progressMsg); + long handle = 0; + if (progressMsg != null) + { + handle = cvf.startProgressBar(progressMsg); + } try { sendChimeraCommand(command, false); } finally { - cvf.stopProgressBar(null, stm); + if (progressMsg != null) + { + cvf.stopProgressBar(null, handle); + } } } });