#21600 closed defect (fixed)
[patch] After downloading more notes, clicking on first note points to previous first one
Reported by: | angoca | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.06 |
Component: | Core notes | Version: | |
Keywords: | template_report, notes, download | Cc: |
Description
What steps will reproduce the problem?
- Select a note in OSM, and click edit on JOSM (to download the map data).
- Change to JOSM, and download the notes in that area.
- Resolve the selected note.
- Select another note in OSM, and click edit on JOSM.
- Click on the first note of the Notes view, it will point to the previous note. Not the currently selected.
What is the expected result?
JOSM should do zoom to the current selected note, not the previous one.
What happens instead?
JOSM zooms to the previous one.
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-11-01 23:05:46 +0100 (Mon, 01 Nov 2021) Build-Date:2021-11-01 22:25:18 Revision:18303 Relative:URL: ^/trunk Identification: JOSM/1.5 (18303 en) Mac OS X 10.15.7 OS Build number: Mac OS X 10.15.7 (19H1519) Memory Usage: 2019 MB / 3641 MB (250 MB allocated, but free) Java version: 1.8.0_311-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 69731270 1440×900 (scaling 1.00×1.00) Maximum Screen Size: 1440×900 Best cursor sizes: 16×16→16×16, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_CO Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-2db50015, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-7a1c6b48.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"] Dataset consistency test: No problems found Plugins: + DirectDownload (35640) + DxfImport (1014) + FastDraw (35864) + ImportImagePlugin (35567) + ImproveOsm (215) + Mapillary (2.0.0-alpha.43) + PicLayer (1.0.1) + apache-commons (35524) + apache-http (35589) + buildings_tools (35823) + continuosDownload (99) + ejml (35458) + fieldpapers (v0.5.0) + geotools (35458) + imagery_offset_db (35640) + jaxb (35543) + jna (35662) + jts (35458) + log4j (35852) + opendata (35803) + pdfimport (35640) + photo_geotagging (35783) + undelete (35848) + utilsplugin2 (35856) Validator rules: + ${HOME}/github/ColombianJosmValidator/Rules_Colombian-specific.validator.mapcss Last errors/warnings: - 138600.470 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 138600.472 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 138601.104 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 138601.105 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 143842.226 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 143842.226 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 168272.347 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 168272.348 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 168272.940 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed - 168272.944 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed
Attachments (1)
Change History (12)
by , 3 years ago
Attachment: | Screen Shot 2021-11-25 at 7.17.25 PM.png added |
---|
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
Can be a note caching/networking issue, but the steps are not clear for me, cannot reproduce. Please clarify.
comment:3 by , 3 years ago
I created a video in YouTube that better explain the problem: https://youtu.be/YUE_F29aXrU
comment:4 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
I see, thank you! I'm looking into it.
comment:5 by , 3 years ago
Summary: | After downloading more notes, clicking on first note points to previous first one → [patch] After downloading more notes, clicking on first note points to previous first one |
---|
Ah found the cause. It's only a GUI thing, fortunately. At https://youtu.be/YUE_F29aXrU?t=65 you have the selection on note/1003367. After download, the selection goes onto note/1007708, but the selection dataset not updated internally.
The following patch fixes the issue.
-
src/org/openstreetmap/josm/data/notes/Note.java
IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 diff --git a/src/org/openstreetmap/josm/data/notes/Note.java b/src/org/openstreetmap/josm/data/notes/Note.java
a b 29 29 30 30 /** 31 31 * Sorts notes in the following order: 32 * 1) Open notes 33 * 2) Closed notes 34 * 3) New notes 32 * <ol> 33 * <li>Open notes</li> 34 * <li>Closed notes</li> 35 * <li>New notes</li> 36 * </ol> 35 37 * Within each subgroup it sorts by ID 36 38 */ 37 39 public static final Comparator<Note> DEFAULT_COMPARATOR = (n1, n2) -> { -
src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 diff --git a/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
a b 205 205 public void setNotes(Collection<Note> noteList) { 206 206 model.setData(noteList); 207 207 updateButtonStates(); 208 selectionChanged(); 208 209 this.repaint(); 209 210 }
comment:6 by , 3 years ago
The side effect is that the selection "locks" the list view to the selected note. So downloading new notes no longer moves the selection to the top of the list in the Notes dialog.
It applies only if there was a selected note in the list.
comment:8 by , 2 years ago
Milestone: | → 22.06 |
---|
comment:11 by , 2 years ago
No problem -- I should have run the tests as well, especially considering the age of the ticket. I just applied it locally, and checked to make certain that things weren't broken in standard use, and validated that the fix appeared to work.
Anyway, this is one of the reasons why I like unit tests, although those are kinda hard for UI issues.
The failing test was fairly recent, so given the age of this ticket, I wouldn't be surprised that it failed -- see #21558 (r18454).
As you can see in the attached image, the selected one is 830631 from the Notes panel, but the one in the map is 828372. This was before downloading more notes.
The way to download more notes is the button on the Notes panel.