From: <sh...@us...> - 2006-09-20 17:41:02
|
Revision: 6991 http://svn.sourceforge.net/cdk/?rev=6991&view=rev Author: shk3 Date: 2006-09-20 10:40:49 -0700 (Wed, 20 Sep 2006) Log Message: ----------- fixes bug #1562365 Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/applications/jchempaint/action/OpenAction.java Modified: trunk/cdk/src/org/openscience/cdk/applications/jchempaint/action/OpenAction.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/applications/jchempaint/action/OpenAction.java 2006-09-20 17:16:25 UTC (rev 6990) +++ trunk/cdk/src/org/openscience/cdk/applications/jchempaint/action/OpenAction.java 2006-09-20 17:40:49 UTC (rev 6991) @@ -61,7 +61,6 @@ private static final long serialVersionUID = 1030940425527065876L; - private IChemFile chemFile; private FileFilter currentFilter = null; /** @@ -148,6 +147,7 @@ String error = null; ChemModel chemModel = null; + IChemFile chemFile=null; if (cor.accepts(IChemFile.class)) { // try to read a ChemFile try { @@ -157,7 +157,7 @@ jcpPanel.processChemFile(chemFile); if(jcpPanel.getJChemPaintModel().getControllerModel().getAutoUpdateImplicitHydrogens()){ HydrogenAdder hydrogenAdder = new HydrogenAdder("org.openscience.cdk.tools.ValencyChecker"); - org.openscience.cdk.interfaces.IMolecule[] mols = chemModel.getSetOfMolecules().getMolecules(); + org.openscience.cdk.interfaces.IMolecule[] mols = chemFile.getChemSequence(0).getChemModel(0).getSetOfMolecules().getMolecules(); for (int i = 0; i < mols.length; i++) { org.openscience.cdk.interfaces.IMolecule molecule = mols[i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |