diff options
author | Felipe Heidrich | 2010-05-06 19:34:35 +0000 |
---|---|---|
committer | Felipe Heidrich | 2010-05-06 19:34:35 +0000 |
commit | 5d481eb94dd9735c6823f25bd5b89f82bd50c140 (patch) | |
tree | e3cf88258633d607fe83e2da20aa23a892c2cb8f /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common | |
parent | 2d71645750c5f09fce354f39285ebcca3ac73cfa (diff) | |
download | eclipse.platform.swt-5d481eb94dd9735c6823f25bd5b89f82bd50c140.tar.gz eclipse.platform.swt-5d481eb94dd9735c6823f25bd5b89f82bd50c140.tar.xz eclipse.platform.swt-5d481eb94dd9735c6823f25bd5b89f82bd50c140.zip |
Bug 311819 - StyledText getTextAttributes should always return font & colors
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java index c2d5e9e53e..5845e253a5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java @@ -6685,6 +6685,7 @@ void initializeAccessible() { if (!isListening(LineGetStyle) && st.renderer.styleCount == 0) { e.start = 0; e.end = contentLength; + e.textStyle = new TextStyle(st.getFont(), st.foreground, st.background); return; } int offset = Math.max(0, Math.min(e.offset, contentLength - 1)); @@ -6709,7 +6710,7 @@ void initializeAccessible() { if (e.textStyle == null) { e.textStyle = new TextStyle(st.getFont(), st.foreground, st.background); } else { - if (e.textStyle.foreground == null || e.textStyle.background == null) { + if (e.textStyle.foreground == null || e.textStyle.background == null || e.textStyle.font == null) { TextStyle textStyle = new TextStyle(e.textStyle); if (textStyle.foreground == null) textStyle.foreground = st.foreground; if (textStyle.background == null) textStyle.background = st.background; |