src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Add element to relation at a specific position
     * 
     * @param e OsmElement to add
     * @param pos position to insert the element
     * @param role role of the element
     * @param rel relation to add the element to
     */
Add element to relation at a specific position

@param e OsmElement to add
@param pos position to insert the element
@param role role of the element
@param rel relation to add the element to
Add element to relation at a specific position @param e OsmElement to add @param pos position to insert the element @param role role of the element @param rel relation to add the element to
private void addElementToRelation(@NonNull final OsmElement e, final int pos, final String role, @NonNull final Relation rel) {
        dirty = true;
        undo.save(rel);
        undo.save(e);
        validateRelationMemberCount(rel, 1);
        RelationMember newMember = new RelationMember(role, e);
        rel.addMember(pos, newMember);
        e.addParentRelation(rel);
        rel.updateState(OsmElement.STATE_MODIFIED);
        apiStorage.insertElementSafe(rel);
        onElementChanged(null, rel);
        onParentRelationChanged(e);
    }
private void addElementToRelation ( @ NonNull final OsmElement e , final int pos , final String role , @ NonNull final Relation rel ) { dirty = true ; undo . save ( rel ) ; undo . save ( e ) ; validateRelationMemberCount ( rel , 1 ) ; RelationMember newMember = new RelationMember ( role , e ) ; rel . addMember ( pos , newMember ) ; e . addParentRelation ( rel ) ; rel . updateState ( OsmElement . STATE_MODIFIED ) ; apiStorage . insertElementSafe ( rel ) ; onElementChanged ( null , rel ) ; onParentRelationChanged ( e ) ; }
Add element to relation at a specific position
Add element to relation at a specific position