Opened 5 years ago
Closed 5 years ago
#19121 closed enhancement (fixed)
[Patch] JosmAction.checkAndConfirmOutlyingOperation() should also handle dataset without download area
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Core | Version: | |
Keywords: | Cc: | Skyper |
Description (last modified by )
We have some actions (unglue, delete, join area) which call this method to ask for user confirmation with texts like
"You are about to delete nodes outside of the area you have downloaded."
This message doesn't cover the case that the user didn't donwload any area when e.g. an overpass query was used or maybe download object.
I think the text should be changed to
"You are about to delete nodes not inside any area you have downloaded."
and the test should be changed to detect the corresponding case.
Attachments (1)
Change History (18)
by , 5 years ago
Attachment: | 19121.patch added |
---|
comment:1 by , 5 years ago
Cc: | added; removed |
---|---|
Description: | modified (diff) |
follow-up: 3 comment:2 by , 5 years ago
How about, You are about to delete nodes outside of an area you have completely downloaded.
?
comment:3 by , 5 years ago
Replying to skyper:
How about,
You are about to delete nodes outside of an area you have completely downloaded.
?
I think this still implies that there is an area which was downloaded.
Maybe You are about to delete nodes which can have other referrers not yet downloaded.
?
comment:4 by , 5 years ago
Yes, better and in sync with possible future warning You are about to move nodes which can have other referrers not yet downloaded.
comment:6 by , 5 years ago
I am not sure about unglue and ways with id:0
:
- split a way with at least one node inside downloaded area
- unglue node of just created new way
Think here a warning is still useful.
If you "unglue" or "extract node" in advance, similar can happen with nodes with id:0
.
follow-up: 8 comment:7 by , 5 years ago
Not related to this ticket. I did not suppress any warning. I've only added one for the case that no download area exists.
comment:8 by , 5 years ago
Replying to GerdP:
I've only added one for the case that no download area exists.
Exactly, I might be reading this wrong but, in my eyes, we'll miss some cases with ways with id:0 :
-
trunk/src/org/openstreetmap/josm/command/Command.java
a b 229 229 res |= IS_INCOMPLETE; 230 230 } 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))) { 232 233 res |= IS_OUTSIDE; 233 234 }
comment:9 by , 5 years ago
!osm.isNew()
is equivalent to id:0. I don't like to use osm.getId() == 0
because one always has to check twice to make sure that osm.getId()
always returns 0 for negative ids.
comment:10 by , 5 years ago
Thanks for explanation, guess I have to train my eyes/brain to better read/understand diffs.
comment:11 by , 5 years ago
In fact I should have written osm.isNew()
is equivalent to osm.getId() == 0
. For a new object we cannot download parents.
Looking at the patch again I think a pair of() is missing :(
comment:14 by , 5 years ago
Milestone: | → 20.04 |
---|
comment:16 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
r16365 introduced a regression. When an empty relation is deleted and there is no download area a popup "You are about to delete nodes which can have other referrers not yet downloaded..." is shown.
The dialog should probably be used by a lot more actions. In a later step I want to replace it by a dialog which asks the user if downloading more data is OK.
If you don't like the new text please suggest an alternative.