diff options
author | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-10-18 14:12:48 -0400 |
---|---|---|
committer | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-10-18 14:12:48 -0400 |
commit | 6dc89de91d46447685a1a12b5c7699bbce08b683 (patch) | |
tree | dac4fbe5cb026b3991d65e65fbf49ce70e6d9f87 /bundles/org.eclipse.swt | |
parent | 7af47a59f82412ce6a16d41e49fd011a2d52993e (diff) | |
download | eclipse.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')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 7 |
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); } } |