summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2003-08-08 22:07:53 +0000
committerSilenio Quarti <silenio>2003-08-08 22:07:53 +0000
commit060dafd8659c6172dae888c79a06bee8479f97cc (patch)
treea764ee36b2d20184b7d5e8db69895753596a7dcc
parent8c4aab30e72216e23f2c03bdb2b40776fb26240c (diff)
downloadeclipse.platform.swt-060dafd8659c6172dae888c79a06bee8479f97cc.tar.gz
eclipse.platform.swt-060dafd8659c6172dae888c79a06bee8479f97cc.tar.xz
eclipse.platform.swt-060dafd8659c6172dae888c79a06bee8479f97cc.zip
41111
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java
index 72cb343246..c738086701 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java
@@ -170,6 +170,17 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
GC gc = new GC (this);
gc.copyArea (x, y, width, height, destX, destY);
gc.dispose ();
+ if (all) {
+ Control [] children = _getChildren ();
+ for (int i=0; i<children.length; i++) {
+ Control child = children [i];
+ Rectangle rect = child.getBounds ();
+ if (Math.min(x + width, rect.x + rect.width) > Math.max (x, rect.x) &&
+ Math.min(y + height, rect.y + rect.height) > Math.max (y, rect.y)) {
+ child.setLocation (rect.x + deltaX, rect.y + deltaY);
+ }
+ }
+ }
if (isFocus) caret.setFocus ();
}