Revision: 20699 http://sourceforge.net/p/jmol/code/20699 Author: hansonr Date: 2015-08-14 15:04:06 +0000 (Fri, 14 Aug 2015) Log Message: ----------- Jmol.___JmolVersion="14.3.16_2015.08.14"
bug fix: label "3%" reads "3null" bug fix: {*}.label = ... resets offsets, fonts, and alignment bug fix: label "3%%" is saved in the state as "3%" Modified Paths: -------------- trunk/Jmol/src/org/jmol/shape/Labels.java Modified: trunk/Jmol/src/org/jmol/shape/Labels.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/Labels.java 2015-08-14 14:43:22 UTC (rev 20698) +++ trunk/Jmol/src/org/jmol/shape/Labels.java 2015-08-14 15:04:06 UTC (rev 20699) @@ -38,6 +38,7 @@ import javajs.util.AU; import javajs.util.Lst; import javajs.util.P3; +import javajs.util.PT; import org.jmol.viewer.ActionManager; import org.jmol.viewer.JC; @@ -366,7 +367,7 @@ Map<Integer, Text> labels = (Map<Integer, Text>) value; for (int i = bsSelected.nextSetBit(0); i >= 0 && i < ac; i = bsSelected .nextSetBit(i + 1)) - setTextLabel(i, labels.get(Integer.valueOf(i))); + setTextLabel(i, labels.get(Integer.valueOf(i)), null); return; } @@ -403,7 +404,7 @@ text = Text.newLabel(vwr, Font.getFont3D(fid), strings[i], getColix2(i, atoms[i], false), getColix2(i, atoms[i], true), 0, scalePixelsPerMicron); - setTextLabel(i, text); + setTextLabel(i, text, formats[i]); if (text == null) return; } @@ -424,12 +425,12 @@ .getScalePixelsPerAngstrom(false) * 10000f : 0); } - private void setTextLabel(int i, Text t) { + private void setTextLabel(int i, Text t, String format) { if (t == null) return; String label = t.getText(); Atom atom = atoms[i]; - addString(atom, i, label, label); + addString(atom, i, label, format == null ? PT.rep(label, "%", "%%") : format); setShapeVisibility(atom, true); if (t.colix >= 0) setLabelColix(i, t.colix, PAL.UNKNOWN.id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits