Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12410 closed enhancement (fixed)

[patch] refresh relation

Reported by: kolesar Owned by: team
Priority: normal Milestone: 16.02
Component: Core Version:
Keywords: Cc:

Description

Added a button at the top of relation editor to refresh data from layer. It helps to avoid self-conflict if ways to be added need cut while dialog is open.

Refresh button is disabled if relation is not saved yet or relation on layer equals initial snapshot stored in editor.

Apply button is disabled if dialog content equals to initial snapshot. When tags or members are modified, button is enabled. After applying changes button is disabled again.

Attachments (1)

RefreshRelationEditor.patch (21.3 KB ) - added by kolesar 8 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by Don-vip, 8 years ago

the patch must be refreshed with latest changes on relation editor (see #12412)

by kolesar, 8 years ago

Attachment: RefreshRelationEditor.patch added

comment:2 by kolesar, 8 years ago

Updated patch. Only one line was modified near my changes.

However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?

comment:3 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 9657/josm:

fix #12410 - new button to refresh relation in relation editor (patch by kolesar, modified for checkstyle, javadoc, unit test)

comment:4 by Don-vip, 8 years ago

Milestone: 16.02

comment:5 by Don-vip, 8 years ago

thanks for the patch! I don't think we have any standard line ending. Maybe we should :)

in reply to:  2 ; comment:6 by stoecker, 8 years ago

However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?

SVN auto-handles this and uses "\n" for Linux/Unix and "\r\n" for Windows. For patches Unix format is preferred (\n), as this makes less trouble in case something gets overlooked.

comment:7 by Don-vip, 8 years ago

In 9659/josm:

see #12410 - rename super interface, fix unit test

in reply to:  6 comment:8 by kolesar, 8 years ago

Replying to stoecker:

However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?

SVN auto-handles this and uses "\n" for Linux/Unix and "\r\n" for Windows. For patches Unix format is preferred (\n), as this makes less trouble in case something gets overlooked.

I checked out repository from git mirror, some files have CRLF line endings. Git preserves line endings by default, will override to LF as I use Linux.

comment:9 by bastiK, 8 years ago

Subverison will change the line ending style to the system default, when the file has the svn property svn:eol-style native. This is missing for some of the files this patch touches, which is the reason for the issues with mixed line endings.

Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.

@team: Please configure subversion, such that svn:eol-style native is added automatically to every new java file (if you haven't already done so)!
See https://www.mediawiki.org/wiki/Subversion/auto-props, the required line is *.java = svn:eol-style=native.

comment:10 by Don-vip, 8 years ago

OK I'll do it :) if not already there, it should also be added to the developer guide :)

in reply to:  9 ; comment:11 by stoecker, 8 years ago

Replying to bastiK:

Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.

Why? For proper files it means no change. Others should be fixed and the patch command can handle EOL differences, so that also does no harm. I found 65 files which don't pass my style validator, probably 55 of these are due to \r\n checkin. Waiting will cause other issues, so I'll fix the problematic files with next checkin.

comment:12 by stoecker, 8 years ago

In 9665/josm:

fix eol-style issues and similar formating stuff, see #12410

comment:13 by stoecker, 8 years ago

In 9666/josm:

see #12410 fix style of tests

comment:14 by stoecker, 8 years ago

In the past I did that sort of cleanup a bit more often...

Note: I left the style of the included external sources even if they do not match.

Last edited 8 years ago by stoecker (previous) (diff)

comment:15 by bastiK, 8 years ago

In 9669/josm:

add missing svn:eol-style=native (see #12410)

in reply to:  11 ; comment:16 by bastiK, 8 years ago

Replying to stoecker:

Replying to bastiK:

Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.

Why? For proper files it means no change. Others should be fixed and the patch command can handle EOL differences, so that also does no harm.

Last time I checked, the patch command was not really great with inconsistent EOL. Only a small number of files are affected, so it shouldn't be too bad in any case.

in reply to:  16 comment:17 by stoecker, 8 years ago

Last time I checked, the patch command was not really great with inconsistent EOL. Only a small number of files are affected, so it shouldn't be too bad in any case.

On Linux doesn't it ask when it detects "\r\n" in patches? Anyway tools dos2unix and unix2dos can help as well as oneliners like perl -pe 's/\r//g' file >file2 or sed -i 's/\r//g' file

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.