Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Uses RendererModel to get all GeneratorParameters

If a generator serve as a base class for other generators
the only instance that can be set is the one that was registered last, this commit fixes that by always look up the parameter from the model and thus will get the one that is in the model's registry.
  • Loading branch information...
commit 0e28dd3d697a259a68041430458f3c282677eee7 1 parent 1f729ca
Arvid Berg authored egonw committed
2  src/main/org/openscience/cdk/renderer/generators/AtomMassGenerator.java
@@ -51,7 +51,7 @@ public IRenderingElement generateElements(
51 51 atom.getImplicitHydrogenCount(),
52 52 alignment,
53 53 atom.getMassNumber(),
54   - super.getAtomColor(atom));
  54 + super.getAtomColor(atom, model));
55 55 }
56 56
57 57 public boolean showCarbon(
2  src/main/org/openscience/cdk/renderer/generators/ExtendedAtomGenerator.java
@@ -85,7 +85,7 @@ public IRenderingElement generate(
85 85 text = atom.getSymbol();
86 86 }
87 87 Point2d p = atom.getPoint2d();
88   - Color c = getAtomColor(atom);
  88 + Color c = getAtomColor(atom,model);
89 89 TextGroupElement textGroup = new TextGroupElement(p.x, p.y, text, c);
90 90 decorate(textGroup, ac, atom, model);
91 91 return textGroup;

0 comments on commit 0e28dd3

Please sign in to comment.
Something went wrong with that request. Please try again.