src/main/java/de/blau/android/easyedit/route/RouteSegmentActionModeCallback.java
/**
     * Start the next step
     * 
     * @param currentSegment the current segment
     * @param nextSegment the next segment
     * @param newCurrentSegment a new current segment if it had to be split
     * @param newNextSegment a new next segment if it had to be split
     */
Start the next step

@param currentSegment the current segment
@param nextSegment the next segment
@param newCurrentSegment a new current segment if it had to be split
@param newNextSegment a new next segment if it had to be split
Start the next step @param currentSegment the current segment @param nextSegment the next segment @param newCurrentSegment a new current segment if it had to be split @param newNextSegment a new next segment if it had to be split
private void nextStep(@NonNull Way currentSegment, @NonNull Way nextSegment, @Nullable Way newCurrentSegment, @Nullable Way newNextSegment) {
        if (newNextSegment == null && newCurrentSegment == null) {
            segments.add(nextSegment);
            logic.setSelectedRelationWays(segments);
            currentSegment = nextSegment;
            logic.setClickableElements(findViaElements(currentSegment, true));
            manager.invalidate();
        } else if (newCurrentSegment != null) {
            Set<Way> fromElements = new HashSet<>();
            fromElements.add(currentSegment);
            fromElements.add(newCurrentSegment);
            Snack.barInfo(main, newNextSegment == null ? R.string.toast_split_first_segment : R.string.toast_split_first_and_next_segment);
            main.startSupportActionMode(new RestartRouteSegmentActionModeCallback(manager, fromElements, route, savedResults));
        } else {
            Snack.barInfo(main, R.string.toast_split_next_segment);
            logic.setClickableElements(findViaElements(currentSegment, false));
        }
    }
private void nextStep ( @ NonNull Way currentSegment , @ NonNull Way nextSegment , @ Nullable Way newCurrentSegment , @ Nullable Way newNextSegment ) { if ( newNextSegment == null && newCurrentSegment == null ) { segments . add ( nextSegment ) ; logic . setSelectedRelationWays ( segments ) ; currentSegment = nextSegment ; logic . setClickableElements ( findViaElements ( currentSegment , true ) ) ; manager . invalidate ( ) ; } else if ( newCurrentSegment != null ) { Set < Way > fromElements = new HashSet < > ( ) ; fromElements . add ( currentSegment ) ; fromElements . add ( newCurrentSegment ) ; Snack . barInfo ( main , newNextSegment == null ? R . string . toast_split_first_segment : R . string . toast_split_first_and_next_segment ) ; main . startSupportActionMode ( new RestartRouteSegmentActionModeCallback ( manager , fromElements , route , savedResults ) ) ; } else { Snack . barInfo ( main , R . string . toast_split_next_segment ) ; logic . setClickableElements ( findViaElements ( currentSegment , false ) ) ; } }
Start the next step
Start the next step