Modify

Opened 5 days ago

Closed 5 days ago

Last modified 5 days ago

#19951 closed defect (fixed)

No warning when multipolygon preset is applied to node(s) only

Reported by: GerdP Owned by: GerdP
Priority: minor Milestone: 20.10
Component: Core Version:
Keywords: template_report multipolygon presets Cc: Klumbumbus

Description

What steps will reproduce the problem?

  1. Select one or more nodes
  2. Presets -> Relations -> Multipolygon
  3. In popup click "New relation"

What is the expected result?

Relation editor opens and notification is shown that multipolygon is not correct.

What happens instead?

Relation editor opens, no notification

Please provide any additional information below. Attach a screenshot if possible.

Found this while looking for memory leaks (#19885)
We can show either existing Multipolygon is not closed or a new message like No way in multipolygon.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-10-03 13:42:38 +0200 (Sat, 03 Oct 2020)
Build-Date:2020-10-04 01:30:47
Revision:17084
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17084 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2004 (19041)
Memory Usage: 1122 MB / 3641 MB (790 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1080
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20201017_095042.jfr]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35579)
+ PolygonCutOut (v0.7)
+ apache-commons (35524)
+ buildings_tools (35579)
+ continuosDownload (91)
+ ejml (35313)
+ geotools (35169)
+ jaxb (35092)
+ jts (35122)
+ merge-overlap (35583)
+ o5m (35248)
+ opendata (35513)
+ pbf (35446)
+ poly (35248)
+ reverter (35579)
+ undelete (35521)
+ utilsplugin2 (35580)

Last errors/warnings:
- 00044.575 W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>

Attachments (1)

19951.patch (1.4 KB) - added by GerdP 5 days ago.
simple solution without new I18n strings shows Multipolygon is not closed

Download all attachments as: .zip

Change History (7)

Changed 5 days ago by GerdP

Attachment: 19951.patch added

simple solution without new I18n strings shows Multipolygon is not closed

comment:1 Changed 5 days ago by GerdP

Cc: Klumbumbus added
Owner: changed from team to GerdP
Status: newassigned

@Klumbumbus I wonder why I can select a preset that cannot match. Is that normal?

comment:2 Changed 5 days ago by skyper

Relations are special, as they can be created without any selection.

Is there any code beside validator which checks for correct child object's type?
As this is not only a problem with multipolygon but for all relations which do not allow at least one of the three object types as member a general message might be needed.

comment:3 Changed 5 days ago by Klumbumbus

Yes the supported object list for each item in the defaultpresets effects only the "Apply preset" button in the preset window. The "New Relation" button is always available if the preset supports relations.

We can show either existing Multipolygon is not closed

I think that would be fine.

comment:4 Changed 5 days ago by GerdP

Resolution: fixed
Status: assignedclosed

In 17223/josm:

fix #19951: No warning when multipolygon preset is applied to node(s) only

  • Show "Multipolygon is not closed" also when relation doesn't contain any way

comment:5 Changed 5 days ago by GerdP

Milestone: 20.10

comment:6 in reply to:  3 Changed 5 days ago by GerdP

Replying to Klumbumbus:

Yes the supported object list for each item in the defaultpresets effects only the "Apply preset" button in the preset window. The "New Relation" button is always available if the preset supports relations.

OK, I understand.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
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.