src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Delete a relation
     * 
     * Note this will only remove backlinks from elements in storage
     * 
     * @param relation relation to remove
     */
Delete a relation

Note this will only remove backlinks from elements in storage

@param relation relation to remove
Delete a relation Note this will only remove backlinks from elements in storage @param relation relation to remove
public void removeRelation(@NonNull final Relation relation) {
        dirty = true;
        undo.save(relation);
        try {
            if (relation.state == OsmElement.STATE_CREATED) {
                apiStorage.removeElement(relation);
            } else {
                apiStorage.insertElementSafe(relation);
            }
            removeElementFromRelations(relation);
            removeRelationFromMembers(relation);
            currentStorage.removeRelation(relation);
            relation.updateState(OsmElement.STATE_DELETED);
            onElementChanged((List<OsmElement>) null, (List<OsmElement>) null);
        } catch (StorageException e) {
            Log.e(DEBUG_TAG, "removeRelation got " + e.getMessage());
        }
    }
public void removeRelation ( @ NonNull final Relation relation ) { dirty = true ; undo . save ( relation ) ; try { if ( relation . state == OsmElement . STATE_CREATED ) { apiStorage . removeElement ( relation ) ; } else { apiStorage . insertElementSafe ( relation ) ; } removeElementFromRelations ( relation ) ; removeRelationFromMembers ( relation ) ; currentStorage . removeRelation ( relation ) ; relation . updateState ( OsmElement . STATE_DELETED ) ; onElementChanged ( ( List < OsmElement > ) null , ( List < OsmElement > ) null ) ; } catch ( StorageException e ) { Log . e ( DEBUG_TAG , "removeRelation got " + e . getMessage ( ) ) ; } }
Delete a relation
Delete a relation
// undo - relation saved here, affected ways saved in removeRelationFromMembers // TODO handle OOM