Ignore:
Timestamp:
2017-09-06T02:03:14+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15229 - see #15182 - see #13036 - remove GUI stuff from Command and DeleteCommand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DeleteAction.java

    r12630 r12749  
    4646        setEnabled(selection != null && !selection.isEmpty());
    4747    }
     48
     49    /**
     50     * Check whether user is about to delete data outside of the download area.
     51     * Request confirmation if he is.
     52     * @param primitives the primitives to operate on
     53     * @param ignore {@code null} or a primitive to be ignored
     54     * @return true, if operating on outlying primitives is OK; false, otherwise
     55     * @since 12749 (moved from DeleteCommand)
     56     */
     57    public static boolean checkAndConfirmOutlyingDelete(Collection<? extends OsmPrimitive> primitives,
     58            Collection<? extends OsmPrimitive> ignore) {
     59        return checkAndConfirmOutlyingOperation("delete",
     60                tr("Delete confirmation"),
     61                tr("You are about to delete nodes outside of the area you have downloaded."
     62                        + "<br>"
     63                        + "This can cause problems because other objects (that you do not see) might use them."
     64                        + "<br>"
     65                        + "Do you really want to delete?"),
     66                tr("You are about to delete incomplete objects."
     67                        + "<br>"
     68                        + "This will cause problems because you don''t see the real object."
     69                        + "<br>" + "Do you really want to delete?"),
     70                primitives, ignore);
     71    }
    4872}
Note: See TracChangeset for help on using the changeset viewer.