Modify

Opened 4 years ago

Closed 21 months ago

#3951 closed enhancement (fixed)

[Patch needs rework] User should be warned when UnGlue-ing two ways outside the download area

Reported by: anonymous Owned by: team
Priority: normal Component: Core
Version: tested Keywords:
Cc:

Description

If I attempt to delete a node on a way outside my download area, the program will warn me that I am doing something without all the facts. The warning dialog correctly warns me that I am operating on nodes that may belong to ways I can't see.

However, if I have two ways that cross outside my download area, I can UnGlue the two ways without a warning, even though it is possible that a third (unseen) way may also use the same node. I haven't tested it, but I presume that when the change set is uploaded, any unseen third way will remain attached to one of the duplicates, but not the other. This is bad, because the user will not be able to take any unseen ways into account when performing operations on the duplicates.

I suggest that when a user attempts to UnGlue two ways outside the download area, the program should present a warning dialog similar to the one that pops up when the user attempts to delete a node outside the download area.

Thanks!

Attachments (3)

3951.patch (12.2 KB) - added by simon04 22 months ago.
3951.v2.patch (18.7 KB) - added by simon04 22 months ago.
3951.test.osm.bz2 (23.6 KB) - added by simon04 22 months ago.
test file

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by Gubaer

  • Type changed from defect to enhancement

Changed 22 months ago by simon04

comment:2 Changed 22 months ago by simon04

  • Summary changed from User should be warned when UnGlue-ing two ways outside the download area to [Patch] User should be warned when UnGlue-ing two ways outside the download area

Patch attached. I'm not sure whether I got the translation stuff correct.

comment:3 Changed 22 months ago by stoecker

  • Summary changed from [Patch] User should be warned when UnGlue-ing two ways outside the download area to [Patch needs rework] User should be warned when UnGlue-ing two ways outside the download area

No, i18n wont work this way. Never calculate or modify texts. Better is to make it generic (use e.g. "change" or "modify") and f.e. pass the complete title text as argument.

comment:4 Changed 22 months ago by simon04

It should suffice to change …

Command.checkAndConfirmOutlyingOperation("unglue", getEditLayer(), p); 

… into …

Command.checkAndConfirmOutlyingOperation(marktr("unglue"), getEditLayer(), p); 

… in order to get I18n correct, right?

comment:5 Changed 22 months ago by stoecker

No. Don't assume foreign languages have the same structure as German or English. It is always hard to translate texts, when other text is inserted into it. This cannot always be prevent (sometimes you must construct strings) but should not be generalized. Better is always to pass complete strings whenever possible.

An example:

if(type == "way")
  text = tr("The object nr. {0} is a way.", id)
else if(type == "node")
  text = tr("The object nr. {0} is a node.", id)
else if(type == "relation")
  text = tr("The object nr. {0} is a relation.", id)

is much better than

  text = tr("The object nr. {0} is a {1}.", id, tr(type))

Look at one of the slavic languages and you see why :-)

Changed 22 months ago by simon04

Changed 22 months ago by simon04

test file

comment:6 Changed 22 months ago by simon04

Note: #5407 could/should also be handled by this patch.

comment:7 Changed 21 months ago by simon04

  • Resolution set to fixed
  • Status changed from new to closed

In [4458/josm]:

fix #3951 - user should be warned when unglue-ing two ways outside the download area

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.