if( tile.y - mousePressLocation.y==0 && tile.x - mousePressLocation.x ==0) {
if( tile.y - mouseInitialPressLocation.y==0 && tile.x - mouseInitialPressLocation.x ==0) {
    public void mouseReleased(MouseEvent event) {        mouseButton = MouseEvent.NOBUTTON;        bMouseIsDown = false;        		if(currentPointerState == PS_MARQUEE) {			Point tile = mapView.screenToTileCoords(event.getX(), event.getY());			if( tile.y - mousePressLocation.y==0 && tile.x - mousePressLocation.x ==0) {				if(marqueeSelection != null) {					currentMap.removeLayerSpecial(marqueeSelection.getId());					marqueeSelection = null;				}	 			}		}                if (paintEdit != null) {            MapLayer layer = currentMap.getLayer(currentLayer);            if (layer != null) {                try {                    MapLayer endLayer = paintEdit.getStart().createDiff(layer);                    paintEdit.end(endLayer);                    undoSupport.postEdit(paintEdit);                } catch (Exception e) {                    e.printStackTrace();                }            }            paintEdit = null;        }    }