Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2019-02-26 18:00:27 +0000
committerMickael Istria2019-02-26 19:41:08 +0000
commit5f62a4a1adeb10f11945002f188bd16f4d3e2121 (patch)
treee486073f62a1736cfac3e5f4966f3b58d185af45 /bundles
parent33ab81d8513fb320fbe759c8b766299f584d5c3f (diff)
downloadeclipse.platform.swt-5f62a4a1adeb10f11945002f188bd16f4d3e2121.tar.gz
eclipse.platform.swt-5f62a4a1adeb10f11945002f188bd16f4d3e2121.tar.xz
eclipse.platform.swt-5f62a4a1adeb10f11945002f188bd16f4d3e2121.zip
Revert "Revert "Bug 541415 - setLineVerticalIndent makes getTopPixel fail""
Make setLineVerticalIndent reset the outdated verticalOffsetPixel when the indent affects the scroll location, so vertifactOffset gets recomputed later when necessary. This reverts commit 33ab81d8513fb320fbe759c8b766299f584d5c3f. Change-Id: I62a23f7f538090477ab162e3df3889c0af5060e1
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java3
1 files changed, 3 insertions, 0 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 0de126739e..ed4a25ac0c 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
@@ -9401,6 +9401,9 @@ public void setLineVerticalIndent(int lineIndex, int verticalLineIndent) {
}
setVariableLineHeight();
int oldBottom = getLinePixel(lineIndex + 1);
+ if (oldBottom <= getClientArea().height) {
+ verticalScrollOffset = -1;
+ }
renderer.setLineVerticalIndent(lineIndex, verticalLineIndent);
resetCache(lineIndex, 1);
int newBottom = getLinePixel(lineIndex + 1);

Back to the top