summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-08-23 14:28:33 -0400
committerFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-08-23 14:28:33 -0400
commitbd21f3765c0c3d8551e66cecb7910c23ee2a020c (patch)
tree19b8d6700eb7beaee960c7f236c59e7cf7f63583
parentb7c19e983e9456bdf0d2ee92350178d8b1f5fe47 (diff)
downloadeclipse.platform.swt-bd21f3765c0c3d8551e66cecb7910c23ee2a020c.tar.gz
eclipse.platform.swt-bd21f3765c0c3d8551e66cecb7910c23ee2a020c.tar.xz
eclipse.platform.swt-bd21f3765c0c3d8551e66cecb7910c23ee2a020c.zip
Bug 355524 - StyledText: Horizontal scrollbar is not reset when calling setText(String)
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
index f22fed017a..adfa92ca7b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
@@ -1068,6 +1068,8 @@ void setContent(StyledTextContent content) {
lineCount = content.getLineCount();
lineWidth = new int[lineCount];
lineHeight = new int[lineCount];
+ maxWidth = 0;
+ maxWidthLineIndex = -1;
reset(0, lineCount);
}
void setFont(Font font, int tabs) {