Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2016-02-15 04:03:03 -0500
committerIvan Furnadjiev2016-02-15 04:03:03 -0500
commit69b62c6d420b843818217f98945f96e75b63a74c (patch)
tree0f66e614c8c086ba9bfee0602ef683b87d5aed9e /bundles
parentab44b26d3e70bb3c8503819336b2cbb43fe9d30e (diff)
downloadorg.eclipse.rap-69b62c6d420b843818217f98945f96e75b63a74c.tar.gz
org.eclipse.rap-69b62c6d420b843818217f98945f96e75b63a74c.tar.xz
org.eclipse.rap-69b62c6d420b843818217f98945f96e75b63a74c.zip
Avoid render Scrollbars twice
Some custom widgets like Nebula GanttChart has overridden getHorizontal/VerticalBar() methods that return a ScrollBar instance, which does not belong to it (has different parent). As a result these scrollbars are rendered twice - once after the custom widget and once after the actual parent. This leads to client crash, when scrollbar is rendered before its actual parent. Change WidgetTreeUtil#handleScrollBars to visit only those scrollbars that belongs to the current scrollable. Change-Id: I5bb02a53c4b2835a7d4aeffe45b29034595de68a
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/WidgetTreeUtil.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/WidgetTreeUtil.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/WidgetTreeUtil.java
index e3dd173681..a39946a09b 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/WidgetTreeUtil.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/WidgetTreeUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2002, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -95,11 +95,11 @@ public class WidgetTreeUtil {
if( root instanceof Scrollable ) {
Scrollable scrollable = ( Scrollable )root;
ScrollBar horizontalBar = scrollable.getHorizontalBar();
- if( horizontalBar != null ) {
+ if( horizontalBar != null && horizontalBar.getParent() == scrollable ) {
accept( horizontalBar, visitor );
}
ScrollBar verticalBar = scrollable.getVerticalBar();
- if( verticalBar != null ) {
+ if( verticalBar != null && verticalBar.getParent() == scrollable ) {
accept( verticalBar, visitor );
}
}

Back to the top