summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2008-07-31 15:44:54 +0000
committerGrant Gayed <ggayed>2008-07-31 15:44:54 +0000
commit50b584631690d5c2c8ad5fdd401f2599d4e81bd7 (patch)
tree49b940acca4155c7997e35f6eb8be692b5577951 /bundles
parent3ead8eac7890510dfcd7f5951a990db354ddb856 (diff)
downloadeclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.tar.gz
eclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.tar.xz
eclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.zip
242484 - Rectangle.contains(int, int) returns incorrect results
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java
index 9004086c6f..c09e15f454 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java
@@ -120,7 +120,7 @@ public void add (Rectangle rect) {
* @return <code>true</code> if the rectangle contains the point and <code>false</code> otherwise
*/
public boolean contains (int x, int y) {
- return (x >= this.x) && (y >= this.y) && ((x - this.x) < width) && ((y - this.y) < height);
+ return (x >= this.x) && (y >= this.y) && x < (this.x + width) && y < (this.y + height);
}
/**