Changeset 16365 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-04-20T14:58:12+02:00 (5 years ago)
Author:
GerdP
Message:

fix #19121: JosmAction.checkAndConfirmOutlyingOperation() should also handle dataset without download area

  • adjust message texts
  • also check if object is old and no download area exists
Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

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

    r14397 r16365  
    9696        return checkAndConfirmOutlyingOperation("delete",
    9797                tr("Delete confirmation"),
    98                 tr("You are about to delete nodes outside of the area you have downloaded."
     98                tr("You are about to delete nodes which can have other referrers not yet downloaded."
    9999                        + "<br>"
    100100                        + "This can cause problems because other objects (that you do not see) might use them."
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r16187 r16365  
    520520        // TODO: Only display this warning when nodes outside dataSourceArea are deleted
    521521        boolean ok = checkAndConfirmOutlyingOperation("joinarea", tr("Join area confirmation"),
    522                 trn("The selected way has nodes outside of the downloaded data region.",
    523                     "The selected ways have nodes outside of the downloaded data region.",
     522                trn("The selected way has nodes which can have other referrers not yet downloaded.",
     523                    "The selected ways have nodes which can have other referrers not yet downloaded.",
    524524                    ways.size()) + "<br/>"
    525525                    + tr("This can lead to nodes being deleted accidentally.") + "<br/>"
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r16138 r16365  
    496496     * Check whether user is about to operate on data outside of the download area.
    497497     * Request confirmation if he is.
     498     * Also handles the case that there is no download area.
    498499     *
    499500     * @param operation the operation name which is used for setting some preferences
    500501     * @param dialogTitle the title of the dialog being displayed
    501      * @param outsideDialogMessage the message text to be displayed when data is outside of the download area
     502     * @param outsideDialogMessage the message text to be displayed when data is outside of the download area or no download area exists
    502503     * @param incompleteDialogMessage the message text to be displayed when data is incomplete
    503504     * @param primitives the primitives to operate on
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r16363 r16365  
    504504        final boolean ok = checkAndConfirmOutlyingOperation("unglue",
    505505                tr("Unglue confirmation"),
    506                 tr("You are about to unglue nodes outside of the area you have downloaded."
     506                tr("You are about to unglue nodes which can have other referrers not yet downloaded."
    507507                        + "<br>"
    508508                        + "This can cause problems because other objects (that you do not see) might use them."
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r13174 r16365  
    229229                res |= IS_INCOMPLETE;
    230230            } else if (osm.isOutsideDownloadArea()
    231                     && (ignore == null || !ignore.contains(osm))) {
     231                    || (!osm.isNew() && osm.getDataSet() != null && osm.getDataSet().getDataSourceBounds().isEmpty())
     232                            && (ignore == null || !ignore.contains(osm))) {
    232233                res |= IS_OUTSIDE;
    233234            }
Note: See TracChangeset for help on using the changeset viewer.