From: <ha...@us...> - 2010-05-25 17:53:56
|
Revision: 13213 http://jmol.svn.sourceforge.net/jmol/?rev=13213&view=rev Author: hansonr Date: 2010-05-25 17:53:50 +0000 (Tue, 25 May 2010) Log Message: ----------- modelkit Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelkit/modelKitPopupResourceBundle.java trunk/Jmol/src/org/jmol/viewer/ActionManager.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/modelkit/modelKitPopupResourceBundle.java =================================================================== --- trunk/Jmol/src/org/jmol/modelkit/modelKitPopupResourceBundle.java 2010-05-25 17:30:08 UTC (rev 13212) +++ trunk/Jmol/src/org/jmol/modelkit/modelKitPopupResourceBundle.java 2010-05-25 17:53:50 UTC (rev 13213) @@ -40,7 +40,7 @@ private static String[][] menuContents = { { "modelkitMenu", "atomMenu bondMenu - addh minimize saveSIGNED exit" }, - { "atomMenu" , "assignAtom_XP!RD dragAtomP!RD dragMinimizeP!RD - assignAtom_CP!RD assignAtom_HP!RD assignAtom_NP!RD assignAtom_OP!RD - assignAtom_pP!RD assignAtom_mP!RD" }, + { "atomMenu" , "assignAtom_XP!RD dragAtomP!RD dragMinimizeP!RD - assignAtom_CP!RD assignAtom_HP!RD assignAtom_NP!RD assignAtom_OP!RD - assignAtom_PlP!RD assignAtom_MiP!RD" }, { "bondMenu", "assignBond_0P!RD assignBond_1P!RD assignBond_2P!RD assignBond_3P!RD - assignBond_pP!RD assignBond_mP!RD - rotateBondP!RD" } }; Modified: trunk/Jmol/src/org/jmol/viewer/ActionManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ActionManager.java 2010-05-25 17:30:08 UTC (rev 13212) +++ trunk/Jmol/src/org/jmol/viewer/ActionManager.java 2010-05-25 17:53:50 UTC (rev 13213) @@ -718,13 +718,16 @@ // H C + -, etc. // also check valence and add/remove H atoms as necessary? viewer.undoAction(true); - if (measurementPending.getCount() == 2) + if (measurementPending.getCount() == 2) { viewer.script("connect " + measurementPending.getMeasurementScript(" ", false)); - else if (pressed.inRange(dragged.x, dragged.y)) - viewer.script("assign atom ({" + dragAtomIndex + "}) \"" - + pickAtomAssignType + "\""); - else if (!isPickAtomAssignCharge) { + } else if (pressed.inRange(dragged.x, dragged.y)) { + String s = "assign atom ({" + dragAtomIndex + "}) \"" + + pickAtomAssignType + "\""; + if (isPickAtomAssignCharge) + s += ";{atomindex=" + dragAtomIndex + "}.label='%C'; "; + viewer.script(s); + } else if (!isPickAtomAssignCharge) { Atom a = viewer.getModelSet().atoms[dragAtomIndex]; if (a.getElementNumber() == 1) { viewer.script("delete ({" + dragAtomIndex + "})"); Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2010-05-25 17:30:08 UTC (rev 13212) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2010-05-25 17:53:50 UTC (rev 13213) @@ -6009,6 +6009,9 @@ setPickingMode(null, value ? JmolConstants.PICKING_ASSIGN_BOND : JmolConstants.PICKING_IDENTIFY); setPickingMode(null, value ? JmolConstants.PICKING_ASSIGN_ATOM : JmolConstants.PICKING_IDENTIFY); if (value) { + setNavigationMode(false); + selectAll(); +// setShapeProperty(JmolConstants.SHAPE_LABELS, "color", "RED"); setAtomPickingOption("C"); setBondPickingOption("p"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |