summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
diff options
context:
space:
mode:
authorFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-10-18 14:12:48 -0400
committerFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-10-18 14:12:48 -0400
commit6dc89de91d46447685a1a12b5c7699bbce08b683 (patch)
treedac4fbe5cb026b3991d65e65fbf49ce70e6d9f87 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
parent7af47a59f82412ce6a16d41e49fd011a2d52993e (diff)
downloadeclipse.platform.swt-6dc89de91d46447685a1a12b5c7699bbce08b683.tar.gz
eclipse.platform.swt-6dc89de91d46447685a1a12b5c7699bbce08b683.tar.xz
eclipse.platform.swt-6dc89de91d46447685a1a12b5c7699bbce08b683.zip
Bug 361189 - StyledText vertical scroll bar won't scroll to the end of the text
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java7
1 files changed, 5 insertions, 2 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 b268b8ec3c..852816035f 100644
--- 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
@@ -1615,8 +1615,11 @@ void calculateTopIndex(int delta) {
}
}
if (topIndex != oldTopIndex || oldTopIndexY != topIndexY) {
+ int width = renderer.getWidth();
renderer.calculateClientArea();
- setScrollBars(false);
+ if (width != renderer.getWidth()) {
+ setScrollBars(false);
+ }
}
}
/**
@@ -9334,7 +9337,7 @@ void setScrollBars(boolean vertical) {
}
if (horizontalBar != null) {
setScrollBar(horizontalBar, clientAreaWidth, renderer.getWidth(), leftMargin + rightMargin);
- if (!alwaysShowScroll && horizontalBar.getVisible() && verticalBar != null && !verticalBar.getVisible()) {
+ if (!alwaysShowScroll && horizontalBar.getVisible() && verticalBar != null) {
setScrollBar(verticalBar, clientAreaHeight, renderer.getHeight(), topMargin + bottomMargin);
}
}