Created
August 10, 2012 17:05
-
-
Save rwst/3315686 to your computer and use it in GitHub Desktop.
fixes stacktrace with JCP issue #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/org/openscience/jchempaint/controller/ReactionHub.java b/src/main/org/openscience/jchempaint/controller/ReactionHub.java | |
index beb8ebe..d973f2e 100644 | |
--- a/src/main/org/openscience/jchempaint/controller/ReactionHub.java | |
+++ b/src/main/org/openscience/jchempaint/controller/ReactionHub.java | |
@@ -72,7 +72,7 @@ public class ReactionHub { | |
chemModel.setReactionSet(reactionSet); | |
chemModel.getMoleculeSet().removeAtomContainer(oldcontainer); | |
if(chemModel.getMoleculeSet().getAtomContainerCount()==0) | |
- chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class)); | |
+ chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IMolecule.class)); | |
if(controllerhub.getUndoRedoFactory()!=null && controllerhub.getUndoRedoHandler()!=null){ | |
IUndoRedoable undoredo = controllerhub.getUndoRedoFactory().getMakeReactantOrProductInNewReactionEdit(chemModel, newContainer, oldcontainer, false, "Make Reactant in new Reaction"); | |
controllerhub.getUndoRedoHandler().postEdit(undoredo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment