src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Called after an element has been changed
     * 
     * As it may be fairly expensive to determine all changes pre and/or post may be null Don't call this if just the
     * node positions have changed
     * 
     * @param pre list of changed elements before the operation or null
     * @param post list of changed elements after the operation or null
     */
Called after an element has been changed

As it may be fairly expensive to determine all changes pre and/or post may be null Don't call this if just the
node positions have changed

@param pre list of changed elements before the operation or null
@param post list of changed elements after the operation or null
Called after an element has been changed As it may be fairly expensive to determine all changes pre and / or post may be null Don ' t call this if just the node positions have changed @param pre list of changed elements before the operation or null @param post list of changed elements after the operation or null
void onElementChanged(@Nullable List<OsmElement> pre, @Nullable List<OsmElement> post) {
        if (post != null) {
            boolean nodeChanged = false;
            BoundingBox changed = null;
            for (OsmElement e : post) {
                e.stamp();
                e.resetHasProblem();
                if (Way.NAME.equals(e.getName())) {
                    ((Way) e).invalidateBoundingBox();
                } else if (Node.NAME.equals(e.getName())) {
                    nodeChanged = true;
                    if (changed == null) {
                        changed = e.getBounds();
                    } else {
                        changed.union(e.getBounds());
                    }
                }
            }
            if (nodeChanged) {
                for (Way w : currentStorage.getWays(changed)) {
                    w.invalidateBoundingBox();
                    w.resetHasProblem();
                }
            }
        }
        Logic logic = App.getLogic();
        if (logic != null) { 
            Filter filter = logic.getFilter();
            if (filter != null) {
                filter.onElementChanged(pre, post);
            }
        }
    }
void onElementChanged ( @ Nullable List < OsmElement > pre , @ Nullable List < OsmElement > post ) { if ( post != null ) { boolean nodeChanged = false ; BoundingBox changed = null ; for ( OsmElement e : post ) { e . stamp ( ) ; e . resetHasProblem ( ) ; if ( Way . NAME . equals ( e . getName ( ) ) ) { ( ( Way ) e ) . invalidateBoundingBox ( ) ; } else if ( Node . NAME . equals ( e . getName ( ) ) ) { nodeChanged = true ; if ( changed == null ) { changed = e . getBounds ( ) ; } else { changed . union ( e . getBounds ( ) ) ; } } } if ( nodeChanged ) { for ( Way w : currentStorage . getWays ( changed ) ) { w . invalidateBoundingBox ( ) ; w . resetHasProblem ( ) ; } } } Logic logic = App . getLogic ( ) ; if ( logic != null ) { Filter filter = logic . getFilter ( ) ; if ( filter != null ) { filter . onElementChanged ( pre , post ) ; } } }
Called after an element has been changed
Called after an element has been changed
// this might be null in testing