diff options
Diffstat (limited to 'fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java')
-rw-r--r-- | fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java b/fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java index 58e8ff0a..a7a01693 100644 --- a/fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java +++ b/fest-swing/src/main/java/org/fest/swing/driver/JTreeLocation.java @@ -141,6 +141,8 @@ public final class JTreeLocation { } private @NotNull Point pointAt(@NotNull Rectangle cellBounds) { - return new Point(cellBounds.x, cellBounds.y + cellBounds.height / 2); + // We don't want to click in the middle in case the cell is too wide and the middle is off-screen. + // And we click at a +5 offset to ensure that we are not clicking just outside the cell + return new Point(cellBounds.x + 5, cellBounds.y + cellBounds.height / 2); } } |