Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years 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.11
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 4 years ago.
simple solution without new I18n strings shows Multipolygon is not closed

Download all attachments as: .zip

Change History (9)

by GerdP, 4 years ago

Attachment: 19951.patch added

simple solution without new I18n strings shows Multipolygon is not closed

comment:1 by GerdP, 4 years ago

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 by skyper, 4 years ago

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 by Klumbumbus, 4 years ago

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 by GerdP, 4 years ago

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 by GerdP, 4 years ago

Milestone: 20.10

in reply to:  3 comment:6 by GerdP, 4 years ago

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.

comment:7 by GerdP, 4 years ago

continued in #20024

comment:8 by Don-vip, 4 years ago

Milestone: 20.1020.11

Milestone renamed

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. 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.