Issue #2403 - fixed cursor memory leak.

Former-commit-id: d85cc9abd3 [formerly 724d2acb9233febf94def4a6adfd06bc73b701a8]
Former-commit-id: e354f787c9
This commit is contained in:
Lee Venable 2013-09-24 11:23:30 -05:00
parent 976486a1d5
commit 90ac5a03fa

View file

@ -66,6 +66,7 @@ import com.vividsolutions.jts.geom.Polygon;
* Mar 28, 2013 DR 15974 D. Friedman Do not track removed GIDs.
* Jun 25, 2013 DR 16013 Qinglu Lin Called setUniqueFip() in handleMouseUp().
* Aug 15, 2013 DR 16418 D. Friedman Only raise dialog if editable. Don't call featureEdit if not editable.
* Sep 24, 2013 #2403 lvenable Fixed cursor memory leak.
*
* </pre>
*
@ -94,8 +95,6 @@ public class WarngenUIManager extends InputAdapter {
private final Cursor movePoint;
private final Cursor arrow;
/** The last mouse position - x */
private int lastMouseX;
@ -113,15 +112,12 @@ public class WarngenUIManager extends InputAdapter {
Display display = Display.getCurrent();
movePolygon = new Cursor(display, SWT.CURSOR_SIZEALL);
movePoint = new Cursor(display, SWT.CURSOR_HAND);
arrow = new Cursor(display, SWT.CURSOR_ARROW);
movePolygon = display.getSystemCursor(SWT.CURSOR_SIZEALL);
movePoint = display.getSystemCursor(SWT.CURSOR_HAND);
}
public void dispose() {
warngenLayer.getResourceContainer().unregisterMouseHandler(this);
movePolygon.dispose();
movePoint.dispose();
}
/*
@ -386,8 +382,9 @@ public class WarngenUIManager extends InputAdapter {
if (c2 != null) {
PolygonUtil.truncate(c2, 2);
if (warngenLayer.isModifiedVertexNeedsToBeUpdated()) {
int i = StormTrackUIManager.getCoordinateIndex(warngenLayer,
state.getWarningPolygon().getCoordinates(), c2);
int i = StormTrackUIManager.getCoordinateIndex(
warngenLayer, state.getWarningPolygon()
.getCoordinates(), c2);
if (i != -1) {
this.movePointIndex = i;
}
@ -669,7 +666,7 @@ public class WarngenUIManager extends InputAdapter {
public void setHandleInput(boolean handle) {
handleInput = handle;
if (!handle) {
getShell().setCursor(arrow);
getShell().setCursor(null);
}
}