Skip to content

Commit 515167a

Browse files
committed
Make pitch change of globe using right mouse work as it did before DPI scaling changes. Moving the mouse down should increase the pitch, so it appears that the globe is rotated away from eye.
1 parent d4b6bf4 commit 515167a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gov/nasa/worldwind/awt/BasicViewInputHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,17 @@ public boolean inputActionPerformed(AbstractViewInputHandler inputHandler,
258258
return false;
259259
}
260260

261+
// 'mouseEvent' is in GL surface coords, (0,0) in lower left of canvas
262+
// Make down mouse movement increase the pitch.
261263
Point movement = ViewUtil.subtract(point, lastPoint);
262264
int headingInput = movement.x;
263-
int pitchInput = movement.y;
265+
int pitchInput = -movement.y;
264266
if (mouseDownPoint == null)
265267
mouseDownPoint = lastPoint;
266268
Point totalMovement = ViewUtil.subtract(point, mouseDownPoint);
267269
int totalHeadingInput = totalMovement.x;
268270
int totalPitchInput = totalMovement.y;
269271

270-
271-
272272
ViewInputAttributes.DeviceAttributes deviceAttributes =
273273
getAttributes().getDeviceAttributes(ViewInputAttributes.DEVICE_MOUSE);
274274

0 commit comments

Comments
 (0)