Modify

Opened 3 months ago

Closed 6 weeks ago

#24037 closed defect (fixed)

[PATCH] Relation editor selection list is not refreshed

Reported by: GerdP Owned by: team
Priority: normal Milestone: 25.01
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. load attached file
  2. Open the route relation in the relation editor, select the way named Road2 and add it as last member of the route
  3. Click on the Parent Relations tab
  4. double click on the network relation and add the node with ref 10 as member, close the editor with OK button
  5. in the editor window for the route click the "Tags and Members" tab
  6. try to add the selected node to the route

What is the expected result?

The node is added to the relation

What happens instead?

A popup "This relation already has one or more members referring to the object Road2..."

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

With this rather special workflow the selection list in the route editor window is not refreshed and thus it still shows the road in the selection list on the right instead of the node which is also highlighted.

No longer a problem for me because I've changed my workflow around this bug but maybe there are also situations where you may add unwanted members when you just add the highlighted object without double checking the selection list.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-12-02 20:14:56 +0100 (Mon, 02 Dec 2024)
Revision:19265
Build-Date:2024-12-03 02:30:34
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19265 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 22H2 (19045)
Memory Usage: 1230 MB / 1888 MB (200 MB allocated, but free)
Java version: 21.0.2+13-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19039, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM HWConsole.exe]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (36344)
+ apache-commons (36349)
+ buildings_tools (36344)
+ comfort0 (36354)
+ ejml (36348)
+ geotools (36349)
+ jackson (36349)
+ jaxb (36349)
+ jts (36349)
+ o5m (36349)
+ opendata (36354)
+ pbf (36348)
+ poly (36349)
+ reltoolbox (36344)
+ reverter (36354)
+ undelete (36349)
+ utilsplugin2 (36354)

Tagging presets:
+ c:\josm\core\resources\data\defaultpresets.xml

Validator rules:
+ d:\java_tools\JOSM\mygeometry.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ c:\josm\core\resources\data\validator\combinations.mapcss
+ c:\josm\core\resources\data\validator\geometry.mapcss

Last errors/warnings:
- 00131.248 W: java.io.IOException: Attribution is not loaded yet
- 00131.249 W: java.io.IOException: Attribution is not loaded yet
- 00131.250 W: java.io.IOException: Attribution is not loaded yet
- 00131.251 W: java.io.IOException: Attribution is not loaded yet
- 00131.253 W: java.io.IOException: Attribution is not loaded yet
- 00131.254 W: java.io.IOException: Attribution is not loaded yet
- 00131.255 W: java.io.IOException: Attribution is not loaded yet
- 00131.256 W: java.io.IOException: Attribution is not loaded yet
- 00131.257 W: java.io.IOException: Attribution is not loaded yet
- 00131.258 W: java.io.IOException: Attribution is not loaded yet

Attachments (2)

24037.osm (1.1 KB ) - added by GerdP 3 months ago.
Example data
24037.patch (4.4 KB ) - added by GerdP 6 weeks ago.

Download all attachments as: .zip

Change History (7)

by GerdP, 3 months ago

Attachment: 24037.osm added

Example data

comment:1 by GerdP, 6 weeks ago

I learned that the problem always occurs when the selection is changed while the relation editor window shows either the parent or child relations tab. In this state several listeners are unregistered and thus the selection window is not updated.
Maybe this is related to the changes in r17423 or previous changes which introduced the code to unregister the listeners.

by GerdP, 6 weeks ago

Attachment: 24037.patch added

comment:2 by GerdP, 6 weeks ago

Yes. This is a regression from r17423.
The attached patch

  • reverts of the changes from r17423 to GenericRelationEditor
  • avoids the EDT violations reported in #20228 by using GuiHelper.runInEDT()

comment:3 by stoecker, 6 weeks ago

Milestone: 25.01

comment:4 by stoecker, 6 weeks ago

Summary: Relation editor selection list is not refreshed[PATCH] Relation editor selection list is not refreshed

comment:5 by GerdP, 6 weeks ago

Resolution: fixed
Status: newclosed

In 19279/josm:

fix #24037

  • revert the changes from r17423 in GenericRelationEditor
  • use GuiHelper.runInEDT() to avoid the EDT violations reported in #20228

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.