Browse files

Do not remove calculated properties that are not found in the cache.

Sovles bug 2038
  • Loading branch information...
1 parent 27ffc2a commit f79125bc23dbbb06c8d01905aecdd15474774602 Arvid Berg committed Jul 2, 2010
View
8 ...pse.cdk.ui.sdfeditor/src/net/bioclipse/cdk/ui/sdfeditor/business/SDFIndexEditorModel.java
@@ -149,8 +149,12 @@ public synchronized ICDKMolecule getMoleculeAt( int index ) {
}
}
for(IPropertyCalculator<?> calculator:calculators.values()) {
- CDKMoleculeUtils.setProperty( mol, calculator.getPropertyName(),
- getPropertyFor( index, calculator.getPropertyName() ));
+ Object propertyValue = getPropertyFor( index,
+ calculator.getPropertyName() );
+ if(propertyValue != null)
+ CDKMoleculeUtils.setProperty( mol,
+ calculator.getPropertyName(),
+ propertyValue);
}
}
return mol;

0 comments on commit f79125b

Please sign in to comment.