From: Ben Soares Date: Thu, 26 Jan 2023 11:09:47 +0000 (+0000) Subject: JAL-629 adjust arg type for tempfac-shading -- was grabbing next argument X-Git-Tag: Release_2_11_4_0~490 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=08646d1f0486e645adeaf4ea9a6c0f6b599f980c;p=jalview.git JAL-629 adjust arg type for tempfac-shading -- was grabbing next argument --- diff --git a/src/jalview/bin/ArgParser.java b/src/jalview/bin/ArgParser.java index 877a7f6..bb88536 100644 --- a/src/jalview/bin/ArgParser.java +++ b/src/jalview/bin/ArgParser.java @@ -103,7 +103,7 @@ public class ArgParser TEMPFAC.setOptions(Opt.STRING, Opt.LINKED); TEMPFAC_LABEL.setOptions(Opt.STRING, Opt.LINKED); TEMPFAC_DESC.setOptions(Opt.STRING, Opt.LINKED); - TEMPFAC_SHADING.setOptions(Opt.STRING, Opt.LINKED); + TEMPFAC_SHADING.setOptions(Opt.BOOLEAN, Opt.LINKED); TITLE.setOptions(Opt.STRING, Opt.LINKED); PAEMATRIX.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI); NOSTRUCTURE.setOptions(Opt.UNARY, Opt.LINKED); diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 5f40ba6..2d7f02b 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -340,9 +340,6 @@ public class Commands Console.error("Could not open any files in headless mode"); System.exit(1); } - // TOREMOVE COMMENT - // @Ben assumed this was the GUI version of above, rather then the - // first==false state else { Console.warn("No more files to open"); @@ -458,11 +455,10 @@ public class Commands } } } - String shading = ArgParser.getValue(m, Arg.TEMPFAC_SHADING); - if (shading != null) + + boolean doShading = ArgParser.getBoolean(m, Arg.TEMPFAC_SHADING); + if (doShading) { - Console.debug( - "Annotation colour scheme : " + shading + " (ignored value)"); AlignFrame af = afMap.get(id); for (AlignmentAnnotation aa : af.alignPanel.getAlignment() .findAnnotation(PDBChain.class.getName().toString())) @@ -473,7 +469,6 @@ public class Commands af.changeColour(acg); Console.info("Changed colour " + acg.toString()); } - } }