src/main/java/de/blau/android/easyedit/EasyEditActionModeCallback.java
/**
     * Save the result of a way split operation for later display if necessary
     * 
     * @param originalWay the original Way
     * @param resultList a List containing Results of the split, new Way in 1st
     */
Save the result of a way split operation for later display if necessary

@param originalWay the original Way
@param resultList a List containing Results of the split, new Way in 1st
Save the result of a way split operation for later display if necessary @param originalWay the original Way @param resultList a List containing Results of the split new Way in 1st
protected void saveSplitResult(@NonNull Way originalWay, @Nullable List<Result> resultList) {
        if (resultList != null && !resultList.isEmpty() && (resultList.get(0).hasIssue() || resultList.size() > 1)) {
            List<Result> tempList = new ArrayList<>(resultList);
            Result first = tempList.get(0);
            if (first.hasIssue()) { 
                Result orig = new Result();
                orig.setElement(originalWay);
                orig.addAllIssues(first.getIssues());
                tempList.add(1, orig);
            } else {
                tempList.remove(0);
            }
            for (Result r : tempList) {
                Result saved = savedResults.get(r.getElement());
                if (saved != null) {
                    saved.addAllIssues(r.getIssues());
                } else {
                    savedResults.put(r.getElement(), r);
                }
            }
        }
    }
protected void saveSplitResult ( @ NonNull Way originalWay , @ Nullable List < Result > resultList ) { if ( resultList != null && ! resultList . isEmpty ( ) && ( resultList . get ( 0 ) . hasIssue ( ) || resultList . size ( ) > 1 ) ) { List < Result > tempList = new ArrayList < > ( resultList ) ; Result first = tempList . get ( 0 ) ; if ( first . hasIssue ( ) ) { Result orig = new Result ( ) ; orig . setElement ( originalWay ) ; orig . addAllIssues ( first . getIssues ( ) ) ; tempList . add ( 1 , orig ) ; } else { tempList . remove ( 0 ) ; } for ( Result r : tempList ) { Result saved = savedResults . get ( r . getElement ( ) ) ; if ( saved != null ) { saved . addAllIssues ( r . getIssues ( ) ) ; } else { savedResults . put ( r . getElement ( ) , r ) ; } } } }
Save the result of a way split operation for later display if necessary
Save the result of a way split operation for later display if necessary
// create a result for the original way