Skip to content

Commit

Permalink
Check if the WillDrawAtomNumbers param is registered
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed May 19, 2012
1 parent f37be8f commit 4dedcb0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ public Boolean getDefault() {

public IRenderingElement generate(
IAtomContainer ac, IAtom atom, RendererModel model) {
boolean drawNumbers =
model.getParameter(WillDrawAtomNumbers.class).getValue();
boolean drawNumbers = false;
if (model.hasParameter(WillDrawAtomNumbers.class)) {
drawNumbers =
model.getParameter(WillDrawAtomNumbers.class).getValue();
}
if (!hasCoordinates(atom)
|| invisibleHydrogen(atom, model)
|| (invisibleCarbon(atom, ac, model)
Expand Down

0 comments on commit 4dedcb0

Please sign in to comment.