if(jcpPanel.get2DHub().getActiveDrawModule() instanceof AddBondDragModule)
newActiveModule=new AddAtomModule(jcpPanel.get2DHub(), ((AddBondDragModule)jcpPanel.get2DHub().getActiveDrawModule()).getStereoForNewBond());
else if(jcpPanel.get2DHub().getActiveDrawModule() instanceof AddAtomModule)
newActiveModule=new AddAtomModule(jcpPanel.get2DHub(), ((AddAtomModule)jcpPanel.get2DHub().getActiveDrawModule()).getStereoForNewBond());
logger.debug("About to change atom type of relevant atom!");
IChemObject object = getSource(event);
logger.debug("Source of call: ", object);
Iterator<IAtom> atomsInRange = null;
if (object == null){
//this means the main menu was used
if(jcpPanel.getRenderPanel().getRenderer().getRenderer2DModel().getSelection().isFilled())