diff --git a/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProduct.java b/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProduct.java index 534d2de4b..47871c706 100644 --- a/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProduct.java +++ b/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProduct.java @@ -112,12 +112,22 @@ public GeneProduct() { } /** - * Creates a new {@link GeneProduct} instance. + * Creates a new {@link GeneProduct} instance by copying all fields. * * @param nsb the instance to clone */ public GeneProduct(GeneProduct nsb) { super(nsb); + + // copy GeneProduct-specific fields + if (nsb.isSetLabel()) { + // use the setter to keep property-change semantics consistent + setLabel(nsb.getLabel()); + } + + if (nsb.isSetAssociatedSpecies()) { + setAssociatedSpecies(nsb.getAssociatedSpecies()); + } } /**