From: <ha...@us...> - 2006-09-22 20:22:27
|
Revision: 5662 http://svn.sourceforge.net/jmol/?rev=5662&view=rev Author: hansonr Date: 2006-09-22 13:22:23 -0700 (Fri, 22 Sep 2006) Log Message: ----------- selectionHalos on/off color selectionHalos [color or none] Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Eval.java Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-09-22 20:11:12 UTC (rev 5661) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-09-22 20:22:23 UTC (rev 5662) @@ -1845,6 +1845,7 @@ } void color() throws ScriptException { + int argb; if (statementLength > 5 || statementLength < 2) badArgumentCount(); int tok = statement[1].tok; @@ -1880,9 +1881,14 @@ case Token.background: viewer.setBackgroundArgb(getArgbOrNoneParam(2)); return; + case Token.selectionHalo: + argb = getArgbOrNoneParam(2); + viewer.loadShape(JmolConstants.SHAPE_HALOS); + viewer.setSelectionArgb(argb); + return; case Token.identifier: case Token.hydrogen: - int argb = getArgbOrPaletteParam(2); + argb = getArgbOrPaletteParam(2); String str = (String) statement[1].value; for (int i = JmolConstants.elementNumberMax; --i >= 0;) { if (str.equalsIgnoreCase(JmolConstants.elementNameFromNumber(i))) { @@ -1926,12 +1932,6 @@ argb); return; } - if (str.equalsIgnoreCase("selectionHalo") - || str.equalsIgnoreCase("selectionHalos")) { - viewer.loadShape(JmolConstants.SHAPE_HALOS); - viewer.setSelectionArgb(argb); - return; - } invalidArgument(); default: if (tok == Token.bond) // special hack for bond/bonds confusion This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |