if (newTile != currentMap.getNullTile() && newTile != currentTile) {
if (newTile != currentMap.getNullTile()) {
    private void doMouse(MouseEvent event) {        if (currentMap == null || currentLayer < 0) {            return;        }        //MapLayerEdit mle;        //Component c = e.getComponent();        //System.out.println(e.toString());        //System.out.println(c.getClass().toString());        Point tile = mapView.screenToTileCoords(event.getX(), event.getY());        MapLayer layer = currentMap.getLayer(currentLayer);        if (mouseButton == MouseEvent.BUTTON3) {            Tile newTile = layer.getTileAt(tile.x, tile.y);            if (newTile != currentMap.getNullTile() && newTile != currentTile)            {                setCurrentTile(newTile);            }        } else {            switch (currentPointerState) {                case PS_PAINT:                    paintEdit.setPresentationName("Paint Tool");                    currentBrush.commitPaint(currentMap, tile.x, tile.y, currentLayer);                    mapView.repaintRegion(currentBrush.getCenteredBounds(tile.x,tile.y));                    break;                case PS_ERASE:                    paintEdit.setPresentationName("Erase Tool");                    layer.setTileAt(tile.x, tile.y, currentMap.getNullTile());                    mapView.repaintRegion(new Rectangle(tile.x, tile.y, 1, 1));                    break;                case PS_POUR:                    paintEdit = null;                    Tile oldTile = layer.getTileAt(tile.x, tile.y);                    pour(layer, tile.x, tile.y, currentTile, oldTile);                    mapView.repaint();                    break;                case PS_EYED:                    Tile newTile = layer.getTileAt(tile.x, tile.y);                    if (newTile != currentMap.getNullTile() &&                            newTile != currentTile) {                        setCurrentTile(newTile);                    }                    break;                case PS_MOVE:                    layer.translate(                            tile.x - this.mousePressLocation.x,                            tile.y - mousePressLocation.y);                    mapView.repaint();                    break;            }            updateHistory();        }    }