Opened 4 years ago
Closed 4 years ago
#21198 closed defect (fixed)
[PATCH] Enter key in AutoCompletingComboBox dropdown does not work.
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | 21.08 |
| Component: | Core | Version: | latest |
| Keywords: | template_report regression | Cc: |
Description
What steps will reproduce the problem?
- Open the edit attribute dialog.
- Type key down to open the dropdown.
- Type Enter.
What is the expected result?
The selection appears in the combobox.
What happens instead?
The "toString" representation of the AutoCompletionItem appears.
Please provide any additional information below. Attach a screenshot if possible.
Regression of 18098/josm. See also: #20134
javax.swing.plaf.basic.BasicComboBoxEditor#setItem(Object) and
javax.swing.DefaultListCellRenderer#getListCellRendererComponent} expect
AutoCompletionItem#toString to return a "user-readable" string, while in the current implementation it returns a "programmer-readable" string.
This has been circumvented by various adapter classes, but still there are ways around those adapters. I propose to change the implementation of AutoCompletionItem#toString and get rid of the then useless adapters.
The patch is a much simpler refactoring of AutoCompletionComboBox.
Revision:18124
Is-Local-Build:true
Build-Date:2021-08-04 23:02:01
Identification: JOSM/1.5 (18124 SVN en) Linux Debian GNU/Linux 11 (bullseye)
Memory Usage: 1056 MB / 16064 MB (738 MB allocated, but free)
Java version: 16.0.1+9-Debian-1, Debian, OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Screen: :0.0 3840×2160 (scaling 1.00×1.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: X-Cinnamon
Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-2
libcommons-compress-java: libcommons-compress-java:all-1.20-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20201225-1
liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-3
Program arguments: [${HOME}/sess.joz]
Dataset consistency test: No problems found
Plugins:
+ Mapillary (2.0.0-alpha.30-dirty)
+ apache-commons (35524)
+ apache-http (35589)
+ ejml (35458)
+ geotools (35458)
+ graphview (35640)
+ jaxb (35543)
+ jna (35662)
+ jts (35458)
+ log4j (35458)
+ opendata (35640)
+ reverter (35732)
+ routes (35543)
+ utilsplugin2 (35792)
Tagging presets:
+ ${HOME}/prj/hikemap/josm/data/defaultpresets.xml
+ ${HOME}/prj/hikemap/josm/mypresets.xml
Map paint styles:
+ ${HOME}/prj/hikemap/josm/elemstyles.mapcss
+ https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss
+ ${HOME}/prj/hikemap/josm/hiking.mapcss
+ ${HOME}/prj/hikemap/josm/bus.mapcss
- ${HOME}/prj/hikemap/josm/mtb.mapcss
- ${HOME}/prj/hikemap/josm/piste.mapcss
- ${HOME}/prj/hikemap/josm/milestone.mapcss
+ ${HOME}/prj/hikemap/josm/my_style.mapcss
- ${HOME}/prj/hikemap/josm/bicycle.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
Last errors/warnings:
- 00002.256 W: Update plugins - You updated your JOSM software. To prevent problems the plugins should be updated as well. Update plugins now?
- 00014.133 E: Unsupported savable layer type: WMSLayer
Attachments (1)
Change History (3)
by , 4 years ago
| Attachment: | 21198.patch added |
|---|
comment:1 by , 4 years ago
| Keywords: | regression added |
|---|---|
| Milestone: | → 21.08 |
| Version: | → latest |
comment:2 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |



In 18125/josm: