From 4453c9ca6305df2d2b230d58d9a669fe33cd076b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 23 Jul 2015 18:52:26 +0100 Subject: [PATCH] JAL-1759 reinstate changes from bdfde6ef989da0702cef90f03858f0f30e0bc83a lost during merge. --- src/jalview/gui/Jalview2XML.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 91d6aa8..5366820 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -3801,16 +3801,23 @@ public class Jalview2XML newFileLoc.append(";"); } - if (newFileLoc.length() > 0) + if (newFileLoc.length() == 0) { - int histbug = newFileLoc.indexOf("history = "); + return; + } + int histbug = newFileLoc.indexOf("history = "); + if (histbug > -1) + { + /* + * change "history = [true|false];" to "history = [1|0];" + */ histbug += 10; int diff = histbug == -1 ? -1 : newFileLoc.indexOf(";", histbug); String val = (diff == -1) ? null : newFileLoc .substring(histbug, diff); if (val != null && val.length() >= 4) { - if (val.contains("e")) + if (val.contains("e")) // eh? what can it be? { if (val.trim().equals("true")) { @@ -3823,6 +3830,7 @@ public class Jalview2XML newFileLoc.replace(histbug, diff, val); } } + } final String[] pdbf = pdbfilenames.toArray(new String[pdbfilenames .size()]); -- 1.7.10.2