From: <ha...@us...> - 2010-02-06 00:34:52
|
Revision: 12314 http://jmol.svn.sourceforge.net/jmol/?rev=12314&view=rev Author: hansonr Date: 2010-02-06 00:34:03 +0000 (Sat, 06 Feb 2010) Log Message: ----------- version=11.8.18_dev # bug fix: drawHover status not reported properly after zap/new model loaded Modified Paths: -------------- branches/v11_8/Jmol/src/org/jmol/viewer/Jmol.properties branches/v11_8/Jmol/src/org/jmol/viewer/PickingManager.java branches/v11_8/Jmol/src/org/jmol/viewer/ScriptMathProcessor.java branches/v11_8/Jmol/src/org/jmol/viewer/StateManager.java branches/v11_8/Jmol/src/org/jmol/viewer/Token.java branches/v11_8/Jmol/src/org/jmol/viewer/Viewer.java Modified: branches/v11_8/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/Jmol.properties 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/Jmol.properties 2010-02-06 00:34:03 UTC (rev 12314) @@ -4,6 +4,7 @@ version=11.8.18_dev +# bug fix: drawHover status not reported properly after zap/new model loaded # code: model properties atomCount, bondCount should be private # bug fix: bitsets not properly handled in model deletion # bug fix: bfactor min/max was ignoring first atom Modified: branches/v11_8/Jmol/src/org/jmol/viewer/PickingManager.java =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/PickingManager.java 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/PickingManager.java 2010-02-06 00:34:03 UTC (rev 12314) @@ -40,7 +40,6 @@ private int pickingStyleSelect = JmolConstants.PICKINGSTYLE_SELECT_JMOL; private int pickingStyleMeasure = JmolConstants.PICKINGSTYLE_MEASURE_OFF; - private boolean drawHover; private int pickingStyle; private MeasurementPending measurementQueued; @@ -52,7 +51,7 @@ void clear() { pickingMode = JmolConstants.PICKING_IDENT; - drawHover = false; + pickingStyle = pickingStyleSelect; } void setPickingMode(int pickingMode) { @@ -82,14 +81,6 @@ return pickingStyle; } - void setDrawHover(boolean TF) { - drawHover = TF; - } - - boolean getDrawHover() { - return drawHover; - } - void atomsPicked(BitSet bs, int modifiers) { if (BitSetUtil.firstSetBit(bs) < 0) return; Modified: branches/v11_8/Jmol/src/org/jmol/viewer/ScriptMathProcessor.java =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/ScriptMathProcessor.java 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/ScriptMathProcessor.java 2010-02-06 00:34:03 UTC (rev 12314) @@ -24,6 +24,7 @@ package org.jmol.viewer; import java.util.BitSet; +import java.util.Date; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -603,6 +604,7 @@ return evaluateArray(args); case Token.abs: case Token.acos: + case Token.now: case Token.cos: case Token.sin: case Token.sqrt: @@ -1371,6 +1373,12 @@ q = new Quaternion(p4); return addX(q.toPoint4f()); } + if (tok == Token.now) { + if (args.length == 1 && args[0].tok == Token.string) + return addX((new Date()) + "\t" + ScriptVariable.sValue(args[0])); + return addX(((int) System.currentTimeMillis() & 0x7FFFFFFF) + - (args.length == 0 ? 0 : ScriptVariable.iValue(args[0]))); + } if (args.length != 1) return false; if (isSyntaxCheck) Modified: branches/v11_8/Jmol/src/org/jmol/viewer/StateManager.java =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/StateManager.java 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/StateManager.java 2010-02-06 00:34:03 UTC (rev 12314) @@ -126,6 +126,7 @@ viewer.setShowAxes(false); viewer.setShowBbcage(false); viewer.setShowUnitCell(false); + viewer.setBooleanProperty("drawHover", false); } void setCrystallographicDefaults() { @@ -783,6 +784,7 @@ int delayMaximumMs = 0; float dipoleScale = 1.0f; boolean disablePopupMenu = false; + boolean drawHover = false; boolean drawPicking = false; boolean bondPicking = false; boolean atomPicking = true; @@ -1271,7 +1273,7 @@ setParameterValue("dotsSelectedOnly", dotsSelectedOnly); setParameterValue("dotSurface", dotSurface); setParameterValue("dragSelected", false); - setParameterValue("drawHover", false); + setParameterValue("drawHover", drawHover); setParameterValue("drawPicking", drawPicking); setParameterValue("dynamicMeasurements", dynamicMeasurements); setParameterValue("ellipsoidArcs", ellipsoidArcs); Modified: branches/v11_8/Jmol/src/org/jmol/viewer/Token.java =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/Token.java 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/Token.java 2010-02-06 00:34:03 UTC (rev 12314) @@ -565,6 +565,7 @@ final static int function = 4 | 0 << 9 | mathfunc | flowCommand | noeval; final static int getproperty = 5 | 0 << 9 | mathfunc | command; final static int write = 6 | 0 << 9 | mathfunc | command; + final static int now = 16 | 0 << 9 | mathfunc; // xxx(a) @@ -631,12 +632,13 @@ final static int quaternion = 6 | 4 << 9 | mathfunc | command; final static int axisangle = 7 | 4 << 9 | mathfunc; + // xxx(a,b,c,d,e) final static int within = 1 | 5 << 9 | mathfunc; final public static int connected = 2 | 5 << 9 | mathfunc; - // more SET parameters +// more SET parameters final public static int ambient = setparam | 1; final static int bondmode = setparam | 2; @@ -857,6 +859,7 @@ "moveto", new Token(moveto), "navigate", new Token(navigate), "navigation", null, + "now", new Token(now), "pause", new Token(pause), "wait", null, "pmesh", new Token(pmesh), Modified: branches/v11_8/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- branches/v11_8/Jmol/src/org/jmol/viewer/Viewer.java 2010-02-06 00:26:57 UTC (rev 12313) +++ branches/v11_8/Jmol/src/org/jmol/viewer/Viewer.java 2010-02-06 00:34:03 UTC (rev 12314) @@ -4180,7 +4180,7 @@ } public boolean getDrawHover() { - return pickingManager.getDrawHover(); + return haveDisplay && global.drawHover; } public String getAtomInfo(int atomIndex) { @@ -5582,7 +5582,7 @@ break; } if (key.equalsIgnoreCase("drawHover")) { - pickingManager.setDrawHover(value); + global.drawHover = value; break; } if (key.equalsIgnoreCase("navigationMode")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |