Modify

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#22811 closed defect (fixed)

Map layer is not dirty after processing OSC that adds one node

Reported by: b1tw153 Owned by: team
Priority: normal Milestone: 23.03
Component: Core Version: tested
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Launch JOSM with remote control active
  2. Go to this task on MapRoulette: https://maproulette.org/challenge/38422/task/154616490 (or almost any other task in this challenge)
  3. Select "Edit in JOSM"
  4. Click the edit button
  5. Allow the OSC to load in JOSM
  6. Notice that the Bear Spring node has been added to the map layer
  7. Notice that the upload button is gray and cannot be selected

What is the expected result?

The upload button should be green and active.

What happens instead?

The upload button is gray and inactive.

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

Revision:18678
Build-Date:2023-03-02 13:34:23

Identification: JOSM/1.5 (18678 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 316 MB / 8164 MB (106 MB allocated, but free)
Java version: 17.0.6+10-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 1920×1080 (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: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18678, --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.exe]
Dataset consistency test: No problems found

Plugins:
+ apache-commons (36034)
+ ejml (35924)
+ geotools (36028)
+ jackson (36034)
+ jaxb (35952)
+ jts (36004)
+ opendata (36025)
+ utilsplugin2 (36011)

Last errors/warnings:
- 00000.468 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.470 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00003.467 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available

Attachments (0)

Change History (2)

comment:1 by taylor.smock, 14 months ago

OK. It looks like it is probably an interaction from loading the OSC into the layer directly. Merging the OSC from a different layer worked as expected.

EDIT:
This has a really easy fix:

  • src/org/openstreetmap/josm/io/OsmChangeReader.java

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/org/openstreetmap/josm/io/OsmChangeReader.java b/src/org/openstreetmap/josm/io/OsmChangeReader.java
    a b  
    9292                    parseUnknown();
    9393                }
    9494                if (p != null && action != null) {
    95                     if ("modify".equals(action)) {
     95                    if ("create".equals(action) || "modify".equals(action)) {
    9696                        p.setModified(true);
    9797                    } else if ("delete".equals(action)) {
    9898                        p.setDeleted(true);

Now I just have to write a test for it.

EDIT2: I found a better place to fix the problem.

Last edited 14 months ago by taylor.smock (previous) (diff)

comment:2 by taylor.smock, 14 months ago

Resolution: fixed
Status: newclosed

In 18693/josm:

Fix #22811: Map layer is not dirty after processing OSC that adds one node

The setRequiresUploadToServer(isModified()) calls have been replaced to be
consistent with r13161 (see #13153).

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.