Modify

Opened 10 years ago

Closed 8 years ago

Last modified 13 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 Milestone:
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 8 years ago.
3951.v2.patch (18.7 KB) - added by simon04 8 years ago.
3951.test.osm.bz2 (23.6 KB) - added by simon04 8 years ago.
test file

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by Gubaer

Type: defectenhancement

Changed 8 years ago by simon04

Attachment: 3951.patch added

comment:2 Changed 8 years ago by simon04

Summary: User should be warned when UnGlue-ing two ways outside the download area[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 8 years ago by stoecker

Summary: [Patch] User should be warned when UnGlue-ing two ways outside the download area[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 8 years 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 8 years 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 8 years ago by simon04

Attachment: 3951.v2.patch added

Changed 8 years ago by simon04

Attachment: 3951.test.osm.bz2 added

test file

comment:6 Changed 8 years ago by simon04

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

comment:7 Changed 8 years ago by simon04

Resolution: fixed
Status: newclosed

In [4458/josm]:

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

comment:8 Changed 13 months ago by Don-vip

Ticket #4475 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.