Merge "Issue #2403 - fixed cursor memory leak." into development

Former-commit-id: 9795caee63 [formerly 9795caee63 [formerly 3b53c91be0393123c7c73e6f7bf844f05d26b08d]]
Former-commit-id: 23744696b3
Former-commit-id: ff34d8a183
This commit is contained in:
Lee Venable 2013-09-24 12:10:59 -05:00 committed by Gerrit Code Review
commit cc3c78bd82

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);
}
}