]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Apply updates to font and color of monitor's prefix and suffix nodes 23/4423/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Fri, 4 Sep 2020 06:09:31 +0000 (09:09 +0300)
committerJussi Koskela <jussi.koskela@semantum.fi>
Fri, 4 Sep 2020 06:09:31 +0000 (09:09 +0300)
Change-Id: I8a2290f0dfa232d6729acba25e1e560a723bde91

bundles/org.simantics.diagram/src/org/simantics/diagram/elements/MonitorClass.java

index fd1498d0cac2d33e2fc78ee89c34634bb1f72acb..4e64751dfcf00f12b65cced52423fdf2de30df43 100644 (file)
@@ -551,6 +551,21 @@ public class MonitorClass {
                     shape.setTransform(at2);
                 }
 
+                TextNode prefixNode = e.getHint(KEY_SG_PREFIX_NODE);
+                if (prefixNode != null) {
+                    if (prefixNode.getFont() != font) {
+                        prefixNode.setFont(font);
+                    }
+                    prefixNode.setColor(color);
+                }
+                TextNode suffixNode = e.getHint(KEY_SG_SUFFIX_NODE);
+                if (suffixNode != null) {
+                    if (suffixNode.getFont() != font) {
+                        suffixNode.setFont(font);
+                    }
+                    suffixNode.setColor(color);
+                }
+
                 updatePrefixAndSuffixPositions(e);
             }
         }