From: Jim Procter Date: Thu, 27 Nov 2014 14:56:35 +0000 (+0000) Subject: JAL-674 avoid writing \0 for chain code X-Git-Tag: Jalview_2_9~137^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f8cde294a098c1f729b8c7e95c7e238a17cd0581;p=jalview.git JAL-674 avoid writing \0 for chain code --- diff --git a/src/jalview/ext/jmol/PDBFileWithJmol.java b/src/jalview/ext/jmol/PDBFileWithJmol.java index f5710d3..92dce36 100644 --- a/src/jalview/ext/jmol/PDBFileWithJmol.java +++ b/src/jalview/ext/jmol/PDBFileWithJmol.java @@ -188,7 +188,10 @@ public class PDBFileWithJmol extends AlignFile implements { String mt = model.getModelTitle() == null ? getDataName() : model.getModelTitle(); - mt += _lastChainId; + if (_lastChainId >= ' ') + { + mt += _lastChainId; + } AlignmentAnnotation ann = new AlignmentAnnotation( "Secondary Structure", "Secondary Structure for " + mt, asecstr); diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index b608b95..d56a0dd 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1456,8 +1456,7 @@ public class Jalview2XML } ae.setPosition(a); - if (aa[i].annotations[a].secondaryStructure != ' ' - && aa[i].annotations[a].secondaryStructure != '\0') + if (aa[i].annotations[a].secondaryStructure > ' ') { ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure + "");