Revision: 20461 http://sourceforge.net/p/jmol/code/20461 Author: hansonr Date: 2015-04-28 01:31:27 +0000 (Tue, 28 Apr 2015) Log Message: ----------- Jmol.___JmolVersion="14.2.13_2015.04.27"
bug fix: with set dragSelected, highlight does not recognize whole molecule Modified Paths: -------------- branches/v14_2/Jmol/src/org/jmol/modelset/ModelSet.java branches/v14_2/Jmol/src/org/jmol/render/HalosRenderer.java branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java branches/v14_2/Jmol/src/org/jmol/shape/Halos.java branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties branches/v14_2/Jmol/src/org/jmol/viewer/StateCreator.java branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java branches/v14_2/Jmol/src/org/openscience/jmol/app/jmolpanel/DisplayPanel.java Modified: branches/v14_2/Jmol/src/org/jmol/modelset/ModelSet.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/modelset/ModelSet.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/modelset/ModelSet.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -245,17 +245,8 @@ //variables that will be reset when a new frame is instantiated - private boolean selectionHaloEnabled = false; private boolean echoShapeActive = false; - public void setSelectionHaloEnabled(boolean selectionHaloEnabled) { - this.selectionHaloEnabled = selectionHaloEnabled; - } - - public boolean getSelectionHaloEnabled() { - return selectionHaloEnabled; - } - public boolean getEchoStateActive() { return echoShapeActive; } Modified: branches/v14_2/Jmol/src/org/jmol/render/HalosRenderer.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/render/HalosRenderer.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/render/HalosRenderer.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -39,13 +39,16 @@ @Override protected boolean render() { Halos halos = (Halos) shape; - boolean selectDisplayTrue = vwr.getSelectionHaloEnabled(true); + boolean showOnce = vwr.getShowSelectedOnce(); + boolean selectDisplayTrue = vwr.getSelectionHalosEnabled() || showOnce; + System.out.println(showOnce + " testhalos"); boolean showHiddenSelections = (selectDisplayTrue && vwr.getBoolean(T.showhiddenselectionhalos)); if (halos.mads == null && halos.bsHighlight == null && !selectDisplayTrue) return false; isAntialiased = g3d.isAntialiased(); Atom[] atoms = ms.at; - BS bsSelected = (selectDisplayTrue ? vwr.bsA() : null); + BS bsSelected = (showOnce && vwr.movableBitSet != null ? vwr.movableBitSet + : selectDisplayTrue ? vwr.bsA() : null); boolean needTranslucent = false; g3d.addRenderer(T.circle); for (int i = ms.ac; --i >= 0;) { Modified: branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -6512,7 +6512,7 @@ case T.on: case T.off: if (!chk) - vwr.setSelectionHalos(tok == T.on); + vwr.setSelectionHalosEnabled(tok == T.on); tok = tokAt(++i); if (tok == T.nada) return; Modified: branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -3924,7 +3924,7 @@ case T.display:// deprecated case T.selectionhalos: msg = "selectionHalos " - + (vwr.getSelectionHaloEnabled(false) ? "ON" : "OFF"); + + (vwr.getSelectionHalosEnabled() ? "ON" : "OFF"); break; case T.hetero: msg = "set selectHetero " + vwr.getBoolean(T.hetero); Modified: branches/v14_2/Jmol/src/org/jmol/shape/Halos.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/shape/Halos.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/shape/Halos.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -68,7 +68,7 @@ @Override public void setModelVisibilityFlags(BS bs) { - BS bsSelected = (vwr.getSelectionHaloEnabled(false) ? vwr + BS bsSelected = (vwr.getSelectionHalosEnabled() ? vwr .bsA() : null); for (int i = ac; --i >= 0;) { boolean isVisible = bsSelected != null && bsSelected.get(i) Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2015-04-28 01:31:27 UTC (rev 20461) @@ -4,8 +4,12 @@ # THIS IS THE RELEASE BRANCH # BUG FIXES ONLY, PLEASE -Jmol.___JmolVersion="14.2.13_2015.04.22" +Jmol.___JmolVersion="14.2.13_2015.04.27" +bug fix: with set dragSelected, highlight does not recognize whole molecule + +JmolVersion="14.2.13_2015.04.22" + bug fix: loading mmCIF data in-line loses multi-character chain IDs bug fix: with set picking dragSelected with allowMoveAtoms FALSE and allowRotateSelected TRUE Modified: branches/v14_2/Jmol/src/org/jmol/viewer/StateCreator.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/StateCreator.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/viewer/StateCreator.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -744,7 +744,7 @@ app(commands, "set hideNotSelected " + sm.hideNotSelected); commands.append((String) vwr.getShapeProperty(JC.SHAPE_STICKS, "selectionState")); - if (vwr.getSelectionHaloEnabled(false)) + if (vwr.getSelectionHalosEnabled()) app(commands, "SelectionHalos ON"); if (sfunc != null) commands.append("}\n\n"); Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -693,7 +693,7 @@ */ public boolean headless; - + private void setStartupBooleans() { setBooleanProperty("_applet", isApplet); setBooleanProperty("_JSpecView".toLowerCase(), false); @@ -983,9 +983,11 @@ } void rotateSelected(float deltaX, float deltaY, BS bsSelected) { + // bsSelected null comes from sync. if (isJmolDataFrame()) return; //if (mouseEnabled) { + // "true" in setMovableBitSet call is necessary to implement set allowMoveAtoms tm.rotateXYBy(deltaX, deltaY, setMovableBitSet(bsSelected, true)); refreshMeasures(true); //} @@ -994,6 +996,8 @@ + deltaY : ""); } + public BS movableBitSet; + private BS setMovableBitSet(BS bsSelected, boolean checkMolecule) { if (bsSelected == null) bsSelected = bsA(); @@ -1001,7 +1005,7 @@ BSUtil.andNot(bsSelected, getMotionFixedAtoms()); if (checkMolecule && !g.allowMoveAtoms) bsSelected = ms.getMoleculeBitSet(bsSelected); - return bsSelected; + return movableBitSet = bsSelected; } public void translateXYBy(int xDelta, int yDelta) { @@ -1339,7 +1343,7 @@ } void reportSelection(String msg) { - if (ms.getSelectionHaloEnabled()) + if (selectionHalosEnabled) setTainted(true); if (isScriptQueued() || g.debugScript) scriptStatus(msg); @@ -1414,8 +1418,8 @@ return (haveDisplay ? acm.getRubberBand() : null); } - public boolean isBound(int action, int gesture) { - return (haveDisplay && acm.bnd(action, gesture)); + public boolean isBound(int mouseAction, int jmolAction) { + return (haveDisplay && acm.bnd(mouseAction, jmolAction)); } @@ -2531,6 +2535,7 @@ movingSelected = false; slm.noneSelected = Boolean.FALSE; hoverEnabled = true; + setSelectionHalosEnabled(false); tm.setCenter(); am.initializePointers(1); if (!ms.getMSInfoB("isPyMOL")) { @@ -3742,16 +3747,12 @@ } private Object scriptCheckRet(String strScript, boolean returnContext) { - if (getScriptManager() == null) - return null; - return scm.scriptCheckRet(strScript, returnContext); + return (getScriptManager() == null ? null : scm.scriptCheckRet(strScript, returnContext)); } @Override public synchronized Object scriptCheck(String strScript) { - if (getScriptManager() == null) - return null; - return scriptCheckRet(strScript, false); + return (getScriptManager() == null ? null : scriptCheckRet(strScript, false)); } @Override @@ -4902,7 +4903,7 @@ if (key.equalsIgnoreCase("isNavigating")) return tm.isNavigating(); if (key.equalsIgnoreCase("showSelections")) - return ms.getSelectionHaloEnabled(); + return selectionHalosEnabled; if (g.htUserVariables.containsKey(key)) { SV t = g.getUserVariable(key); if (t.tok == T.on) @@ -6190,9 +6191,9 @@ break; case T.allowmoveatoms: // 12.1.21 + //setBooleanProperty("allowRotateSelected", value); + //setBooleanProperty("dragSelected", value); g.allowMoveAtoms = value; - g.allowRotateSelected = value; - g.dragSelected = value; showSelected = false; break; case T.showscript: @@ -6282,7 +6283,7 @@ g.dotsSelectedOnly = value; break; case T.selectionhalos: - setSelectionHalos(value); + setSelectionHalosEnabled(value); break; case T.selecthydrogen: g.rasmolHydrogenSetting = value; @@ -6639,20 +6640,23 @@ g.setI("axesMode", mode); } - public void setSelectionHalos(boolean TF) { - // display panel can hit this without a frame, apparently - if (TF == ms.getSelectionHaloEnabled()) + private boolean selectionHalosEnabled = false; + + public boolean getSelectionHalosEnabled() { + return selectionHalosEnabled; + } + + public void setSelectionHalosEnabled(boolean TF) { + if (selectionHalosEnabled == TF) return; g.setB("selectionHalos", TF); shm.loadShape(JC.SHAPE_HALOS); - // a frame property, so it is automatically reset - ms.setSelectionHaloEnabled(TF); + selectionHalosEnabled = TF; } - public boolean getSelectionHaloEnabled(boolean isRenderer) { - boolean flag = ms.getSelectionHaloEnabled() || isRenderer && showSelected; - if (isRenderer) - showSelected = false; + public boolean getShowSelectedOnce() { + boolean flag = showSelected; + showSelected = false; return flag; } @@ -7336,6 +7340,7 @@ return; if (deltaX == Integer.MIN_VALUE) { showSelected = true; + movableBitSet = setMovableBitSet(null, !asAtoms); shm.loadShape(JC.SHAPE_HALOS); refresh(6, "moveSelected"); return; @@ -7344,6 +7349,7 @@ if (!showSelected) return; showSelected = false; + movableBitSet = null; refresh(6, "moveSelected"); return; } Modified: branches/v14_2/Jmol/src/org/openscience/jmol/app/jmolpanel/DisplayPanel.java =================================================================== --- branches/v14_2/Jmol/src/org/openscience/jmol/app/jmolpanel/DisplayPanel.java 2015-04-28 01:31:15 UTC (rev 20460) +++ branches/v14_2/Jmol/src/org/openscience/jmol/app/jmolpanel/DisplayPanel.java 2015-04-28 01:31:27 UTC (rev 20461) @@ -117,14 +117,14 @@ void setRotateMode() { if (buttonRotate != null && !isRotateMode()) { buttonRotate.setSelected(true); - vwr.setSelectionHalos(false); + vwr.setSelectionHalosEnabled(false); } } void setModelkitMode() { if (buttonModelkit != null) buttonModelkit.setSelected(true); - vwr.setSelectionHalos(false); + vwr.setSelectionHalosEnabled(false); } @Override @@ -257,7 +257,7 @@ @Override public void actionPerformed(ActionEvent e) { - vwr.setSelectionHalos(false); + vwr.setSelectionHalosEnabled(false); if (statusText != null) { status.setStatus(1, statusText); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits