From: Tuukka Lehtonen Date: Mon, 1 Jun 2020 05:47:33 +0000 (+0300) Subject: Added identity-providing constructor for IconButtonStyleBase X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9588536ba156584e804329920ae85563e6ef0984;p=simantics%2Fplatform.git Added identity-providing constructor for IconButtonStyleBase This is needed to support proper implementation of styles inheriting IconButtonStyleBase. Otherwise query identities of the mentioned class fall back to getClass which does not work in general. gitlab #544 Change-Id: I7bfea53b1ce23e644da03ada3cb027fd34a4780a --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/IconButtonStyleBase.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/IconButtonStyleBase.java index f4c9470bd..4055e8d4a 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/IconButtonStyleBase.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/IconButtonStyleBase.java @@ -18,7 +18,15 @@ public abstract class IconButtonStyleBase extends St abstract protected String getNodePrefix(); abstract protected Class getNodeClass(); - + + public IconButtonStyleBase(Object identity) { + super(identity); + } + + public IconButtonStyleBase() { + super(); + } + private AffineTransform translateAndScaleIfNeeded(AffineTransform tr, Vec2d offset, boolean relativeTransform) { if(relativeTransform) { if(!offset.isZero()) {