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 Changed 8 years ago by Don-vip

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

Changed 8 years ago by kolesar

Attachment: RefreshRelationEditor.patch added

comment:2 Changed 8 years ago by kolesar

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 Changed 8 years ago by Don-vip

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 Changed 8 years ago by Don-vip

Milestone: 16.02

comment:5 Changed 8 years ago by Don-vip

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

comment:6 in reply to:  2 ; Changed 8 years ago by 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.

comment:7 Changed 8 years ago by Don-vip

In 9659/josm:

see #12410 - rename super interface, fix unit test

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

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 Changed 8 years ago by bastiK

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 Changed 8 years ago by Don-vip

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

comment:11 in reply to:  9 ; Changed 8 years ago by 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. 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 Changed 8 years ago by stoecker

In 9665/josm:

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

comment:13 Changed 8 years ago by stoecker

In 9666/josm:

see #12410 fix style of tests

comment:14 Changed 8 years ago by stoecker

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 Changed 8 years ago by bastiK

In 9669/josm:

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

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

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.

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

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.