src/main/java/de/blau/android/easyedit/EasyEditManager.java
/**
     * Handle case where nothing is touched .
     * 
     * @param doubleTap action was a double tap if true
     */
Handle case where nothing is touched .

@param doubleTap action was a double tap if true
Handle case where nothing is touched . @param doubleTap action was a double tap if true
public void nothingTouched(boolean doubleTap) {
        if (!doubleTap && currentActionModeCallback instanceof ExtendSelectionActionModeCallback) {
            Snack.toastTopInfo(getMain(), getMain().getString(R.string.toast_exit_multiselect));
            return; 
        }
        if (currentActionModeCallback instanceof EditRelationMembersActionModeCallback || currentActionModeCallback instanceof BuilderActionModeCallback
                || currentActionModeCallback instanceof ViaElementActionModeCallback || currentActionModeCallback instanceof ToElementActionModeCallback
                || currentActionModeCallback instanceof FromElementActionModeCallback
                || currentActionModeCallback instanceof RestartFromElementActionModeCallback) {
            Snack.toastTopInfo(getMain(), getMain().getString(R.string.toast_abort_actionmode));
            return;
        }
        synchronized (actionModeCallbackLock) {
            if (currentActionModeCallback instanceof ElementSelectionActionModeCallback
                    || currentActionModeCallback instanceof ExtendSelectionActionModeCallback
                    || currentActionModeCallback instanceof WayRotationActionModeCallback || currentActionModeCallback instanceof WayAppendingActionModeCallback
                    || currentActionModeCallback instanceof NewNoteSelectionActionModeCallback) {
                currentActionMode.finish();
            }
        }
        logic.setSelectedNode(null);
        logic.setSelectedWay(null);
        logic.setSelectedRelationWays(null);
        logic.setSelectedRelationNodes(null);
        main.getMap().deselectObjects();
    }
public void nothingTouched ( boolean doubleTap ) { if ( ! doubleTap && currentActionModeCallback instanceof ExtendSelectionActionModeCallback ) { Snack . toastTopInfo ( getMain ( ) , getMain ( ) . getString ( R . string . toast_exit_multiselect ) ) ; return ; } if ( currentActionModeCallback instanceof EditRelationMembersActionModeCallback || currentActionModeCallback instanceof BuilderActionModeCallback || currentActionModeCallback instanceof ViaElementActionModeCallback || currentActionModeCallback instanceof ToElementActionModeCallback || currentActionModeCallback instanceof FromElementActionModeCallback || currentActionModeCallback instanceof RestartFromElementActionModeCallback ) { Snack . toastTopInfo ( getMain ( ) , getMain ( ) . getString ( R . string . toast_abort_actionmode ) ) ; return ; } synchronized ( actionModeCallbackLock ) { if ( currentActionModeCallback instanceof ElementSelectionActionModeCallback || currentActionModeCallback instanceof ExtendSelectionActionModeCallback || currentActionModeCallback instanceof WayRotationActionModeCallback || currentActionModeCallback instanceof WayAppendingActionModeCallback || currentActionModeCallback instanceof NewNoteSelectionActionModeCallback ) { currentActionMode . finish ( ) ; } } logic . setSelectedNode ( null ) ; logic . setSelectedWay ( null ) ; logic . setSelectedRelationWays ( null ) ; logic . setSelectedRelationNodes ( null ) ; main . getMap ( ) . deselectObjects ( ) ; }
Handle case where nothing is touched .
Handle case where nothing is touched .
// User clicked an empty area. If something is selected, deselect it. // don't deselect all just because we didn't hit anything