Revision: 21501
          http://sourceforge.net/p/jmol/code/21501
Author:   hansonr
Date:     2017-04-08 21:30:53 +0000 (Sat, 08 Apr 2017)
Log Message:
-----------
Jmol.___JmolVersion="14.13.1"

new feature: set labelfor {atomset} "value"
 -- allows setting of label with out changing current selection
 -- uses same syntax as LABEL command after {atomset}
 -- for example:
 
   set labelfor @atoms @myLabel
   set labelfor {atomno <= 3} @{["a","b","c"]}
   set labelfor {_C && chirality != ""} "%[atomname] %[chirality]"

bug fix: {*}.chirality with triple bonds fails
bug fix: dotted line has extra dot: measure ID m @1 @4 radius 0.1
bug fix: NBO H-BOND and MODEL focus issues 

Modified Paths:
--------------
    trunk/Jmol/src/org/gennbo/NBODialog.java
    trunk/Jmol/src/org/gennbo/NBOModel.java
    trunk/Jmol/src/org/jmol/render/FontLineShapeRenderer.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/gennbo/NBODialog.java
===================================================================
--- trunk/Jmol/src/org/gennbo/NBODialog.java    2017-04-08 20:22:30 UTC (rev 
21500)
+++ trunk/Jmol/src/org/gennbo/NBODialog.java    2017-04-08 21:30:53 UTC (rev 
21501)
@@ -1109,8 +1109,6 @@
   }
 
   protected void runScriptQueued(String script) {
-    if (script.indexOf("easure") >= 0)
-      System.out.println("TESTING NBOD");
     logInfo("_$ " + PT.rep(script, "\n", "<br>"), Logger.LEVEL_DEBUG);
     vwr.script(script);
   }

Modified: trunk/Jmol/src/org/gennbo/NBOModel.java
===================================================================
--- trunk/Jmol/src/org/gennbo/NBOModel.java     2017-04-08 20:22:30 UTC (rev 
21500)
+++ trunk/Jmol/src/org/gennbo/NBOModel.java     2017-04-08 21:30:53 UTC (rev 
21501)
@@ -458,7 +458,7 @@
         
       });
       atomNumBoxes[i].addFocusListener(new FocusListener() {
-        @Override
+        @Override 
         public void focusGained(FocusEvent arg0) {
           doAtomNumBoxFocus(true, num);
         }
@@ -471,7 +471,7 @@
       atomNumBoxes[i].addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
-          doSetAtomBoxesFromSelection(null);
+          doSetAtomBoxesFromSelection(null, false);
         }
       });
     }
@@ -534,7 +534,7 @@
     innerLinkOptionBox = Box.createHorizontalBox();
     radLinkBond = new JRadioButton("Bond");
     radLinkBond.setSelected(true);
-    JRadioButton radLinkDotted = new JRadioButton("Measure");
+    JRadioButton radLinkDotted = new JRadioButton("Dotted");
     innerLinkOptionBox.add(radLinkBond);
     innerLinkOptionBox.add(radLinkDotted);
     
@@ -572,12 +572,13 @@
   }
 
   protected void doAtomNumBoxFocus(boolean isGained, int num) {
+    System.out.println("atomnumbfocus" + isGained + " " +num);
     if (!isGained) {
       int atnum = PT.parseInt(atomNumBoxes[num].getText());
       if (atnum > vwr.ms.ac || atnum < 1) {
         atomNumBoxes[num].setText("");
       } else {
-        doSetAtomBoxesFromSelection(null);
+        doSetAtomBoxesFromSelection(null, false);
       }
     } else if (num == boxCount - 1) {
       jbApply.setEnabled(modelEditGetSelected().length() > 0);
@@ -592,13 +593,14 @@
     postActionToNBO(actionID);
   }
 
-  protected void updateSelected(boolean doPost) {
+  protected void updateSelected(boolean doPost, boolean setFocus) {
     String selected = modelEditGetSelected();          
     String script = "measure delete;";
     int cnt = selected.split(" ").length;
     editValueTf.setEnabled(cnt > 0);
     editValueTf.setText("");
-    editValueTf.requestFocus();
+    if (editValueTf.isVisible())
+      editValueTf.requestFocus();
     switch (boxCount) {
     case BOX_COUNT_4:
       String desc = "";
@@ -628,7 +630,7 @@
         jbApply.setEnabled(true);
         if (editValueTf.isVisible())
           editValueTf.requestFocus();
-        else
+        else if (setFocus)
           atomNumBoxes[1].requestFocus();
       }
       break;
@@ -663,6 +665,8 @@
     if (actionID == MODEL_ACTION_LINK) {
       script = "";
     }
+    
+    
     dialog.runScriptQueued(script);
     editValueTf.setText("");
     editValueTf.setEnabled(selected.length() > 0);
@@ -838,6 +842,7 @@
     clearSelected(true);
     if (action != MODEL_ACTION_LINK) {
       measures = ""; 
+      innerLinkOptionBox.setVisible(false);
     }
     switch (action) {
     case MODEL_ACTION_MUTATE:
@@ -949,7 +954,7 @@
       jbApply.setEnabled(false);
     }
     if (andShow)
-      updateSelected(false);
+      updateSelected(false, true);
   }
 
   /**
@@ -1223,7 +1228,7 @@
         }
         selected += " " + at1;
       }
-      doSetAtomBoxesFromSelection(selected);
+      doSetAtomBoxesFromSelection(selected, true);
     } else {
       //Bond selection -- just break that into two atom picks
       if (boxCount != BOX_COUNT_2)
@@ -1234,7 +1239,7 @@
     }
   }
 
-  protected void doSetAtomBoxesFromSelection(String selected) {
+  protected void doSetAtomBoxesFromSelection(String selected, boolean 
setFocus) {
     if (selected == null)
       selected = modelEditGetSelected();
     String[] split = PT.getTokens(selected);
@@ -1243,7 +1248,7 @@
       atomNumBoxes[i].setText(i >= split.length ? "" : "  " + split[i]);
       //System.out.println("set  i=" + i + " " + atomNumBoxes[i].getText());
     }
-    updateSelected(false);
+    updateSelected(false, setFocus);
     
   }
 
@@ -1284,7 +1289,7 @@
     } // else if (actionID == MODEL_ACTION_REBOND && serverMode != 
MODEL_ACTION_SYMMETRY)
       //doGetSymmetry();
     if (showSelectedOnFileLoad) {
-      updateSelected(false);
+      updateSelected(false, true);
       showSelectedOnFileLoad = false;
     } else {
       dialog.runScriptQueued("select none; select on;refresh");

Modified: trunk/Jmol/src/org/jmol/render/FontLineShapeRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/render/FontLineShapeRenderer.java   2017-04-08 
20:22:30 UTC (rev 21500)
+++ trunk/Jmol/src/org/jmol/render/FontLineShapeRenderer.java   2017-04-08 
21:30:53 UTC (rev 21501)
@@ -307,7 +307,7 @@
       float d2 = (dx * dx + dy * dy)  / (width * width);
       if (isNdots) {
         f = (float) (Math.sqrt(d2) / 1.5);
-        n = (int) f + 3;
+        n = (int) f + 2;
       } else if (d2 < 8) {
         array = twodots;
       } else if (d2 < 32) {

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-08 20:22:30 UTC 
(rev 21500)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-08 21:30:53 UTC 
(rev 21501)
@@ -61,7 +61,10 @@
    set labelfor {_C && chirality != ""} "%[atomname] %[chirality]"
 
 bug fix: {*}.chirality with triple bonds fails
+bug fix: dotted line has extra dot: measure ID m @1 @4 radius 0.1
+bug fix: NBO H-BOND and MODEL focus issues 
 
+
 JmolVersion="14.12.1"
 
 bug fix: NBO update

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to