src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Remove last node from specified way
     * 
     * If the node is untagged and not a member of any other node it will be deleted. If the result Way has less than 2
     * Nodes it will be deleted.
     * 
     * @param fromEnd if true remove last node else first
     * @param way the Way
     * @param deleteNode delete the node after removing it from the way
     */
Remove last node from specified way

If the node is untagged and not a member of any other node it will be deleted. If the result Way has less than 2
Nodes it will be deleted.

@param fromEnd if true remove last node else first
@param way the Way
@param deleteNode delete the node after removing it from the way
Remove last node from specified way If the node is untagged and not a member of any other node it will be deleted . If the result Way has less than 2 Nodes it will be deleted . @param fromEnd if true remove last node else first @param way the Way @param deleteNode delete the node after removing it from the way
public void removeEndNodeFromWay(boolean fromEnd, @NonNull Way way, boolean deleteNode) {
        dirty = true;
        undo.save(way);
        List<Node> nodes = way.getNodes();
        int size = nodes.size();
        final int endNodeIndex = fromEnd ? size - 1 : 0;
        Node node = nodes.get(endNodeIndex);
        if (size <= Way.MINIMUM_NODES_IN_WAY) {
            Log.w(DEBUG_TAG, "removeWayNode removing degenerate way " + way.getOsmId());
            removeWay(way);
        } else {
            nodes.remove(endNodeIndex);
            way.updateState(OsmElement.STATE_MODIFIED);
            apiStorage.insertElementSafe(way);
        }
        onElementChanged(null, way);
        if (deleteNode) {
            removeNode(node);
        }
    }
public void removeEndNodeFromWay ( boolean fromEnd , @ NonNull Way way , boolean deleteNode ) { dirty = true ; undo . save ( way ) ; List < Node > nodes = way . getNodes ( ) ; int size = nodes . size ( ) ; final int endNodeIndex = fromEnd ? size - 1 : 0 ; Node node = nodes . get ( endNodeIndex ) ; if ( size <= Way . MINIMUM_NODES_IN_WAY ) { Log . w ( DEBUG_TAG , "removeWayNode removing degenerate way " + way . getOsmId ( ) ) ; removeWay ( way ) ; } else { nodes . remove ( endNodeIndex ) ; way . updateState ( OsmElement . STATE_MODIFIED ) ; apiStorage . insertElementSafe ( way ) ; } onElementChanged ( null , way ) ; if ( deleteNode ) { removeNode ( node ) ; } }
Remove last node from specified way
Remove last node from specified way