src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Remove downloaded element from a relation
     * 
     * Note the element does not need to have its state changed or be stored in the API storage since the parent
     * relation back link is just internal.
     * 
     * @param element element to remove
     * @param r relation to remove the element from
     */
Remove downloaded element from a relation

Note the element does not need to have its state changed or be stored in the API storage since the parent
relation back link is just internal.

@param element element to remove
@param r relation to remove the element from
Remove downloaded element from a relation Note the element does not need to have its state changed or be stored in the API storage since the parent relation back link is just internal . @param element element to remove @param r relation to remove the element from
private void removeElementFromRelation(@NonNull final OsmElement element, @NonNull final Relation r) {
        Log.i(DEBUG_TAG, "removing " + element.getName() + " #" + element.getOsmId() + " from relation #" + r.getOsmId());
        dirty = true;
        undo.save(r);
        try {
            r.removeMember(r.getMember(element));
            r.updateState(OsmElement.STATE_MODIFIED);
            apiStorage.insertElementSafe(r);
            undo.save(element);
            element.removeParentRelation(r);
            onElementChanged(null, r);
            onParentRelationChanged(element);
            Log.i(DEBUG_TAG, "... done");
        } catch (StorageException e) {
            Log.e(DEBUG_TAG, "removeElementFromRelation got " + e.getMessage());
        }
    }
private void removeElementFromRelation ( @ NonNull final OsmElement element , @ NonNull final Relation r ) { Log . i ( DEBUG_TAG , "removing " + element . getName ( ) + " #" + element . getOsmId ( ) + " from relation #" + r . getOsmId ( ) ) ; dirty = true ; undo . save ( r ) ; try { r . removeMember ( r . getMember ( element ) ) ; r . updateState ( OsmElement . STATE_MODIFIED ) ; apiStorage . insertElementSafe ( r ) ; undo . save ( element ) ; element . removeParentRelation ( r ) ; onElementChanged ( null , r ) ; onParentRelationChanged ( element ) ; Log . i ( DEBUG_TAG , "... done" ) ; } catch ( StorageException e ) { Log . e ( DEBUG_TAG , "removeElementFromRelation got " + e . getMessage ( ) ) ; } }
Remove downloaded element from a relation
Remove downloaded element from a relation
// TODO handle OOM