diff options
author | angelozerr | 2018-03-17 11:48:05 +0000 |
---|---|---|
committer | Mickael Istria | 2018-03-18 22:00:46 +0000 |
commit | d8be49412acd2fc85a353877525fd71b53232063 (patch) | |
tree | eae1014563cbb94747768f6e4f28bbf4ab2c6d40 | |
parent | e93c31d1fc827bface929fefb152ed940b1567b4 (diff) | |
download | eclipse.platform.swt-d8be49412acd2fc85a353877525fd71b53232063.tar.gz eclipse.platform.swt-d8be49412acd2fc85a353877525fd71b53232063.tar.xz eclipse.platform.swt-d8be49412acd2fc85a353877525fd71b53232063.zip |
Bug 530019 - StyledText.setStyleRange (and some other) reset more cache
than necessary
Change-Id: I3fb57f782bd3167796718dcc16812c0a33926dec
Signed-off-by: angelozerr <angelo.zerr@gmail.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java index dc9a1325e2..f89a1e414d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java @@ -225,7 +225,9 @@ public boolean equals(Object object) { if (font != null) { if (!font.equals(style.font)) return false; } else if (style.font != null) return false; - if (metrics != null || style.metrics != null) return false; + if (metrics != null) { + if (!metrics.equals(style.metrics)) return false; + } else if (style.metrics != null) return false; if (underline != style.underline) return false; if (underlineStyle != style.underlineStyle) return false; if (borderStyle != style.borderStyle) return false; |