From 8225471d9327a80665a0f3c4af9768ac21a20f32 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 1 Jun 2020 08:47:33 +0300 Subject: [PATCH] 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 (cherry picked from commit 9588536ba156584e804329920ae85563e6ef0984) --- .../simantics/diagram/profile/IconButtonStyleBase.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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()) { -- 2.47.1