Modify

Opened 5 years ago

Closed 5 years ago

#10470 closed defect (fixed)

Add tag: problem with position in drop down list

Reported by: skyper Owned by: team
Priority: normal Milestone: 14.12
Component: Core Version: latest
Keywords: template_report drop down list linux Cc: Hojoe, flaimo

Description (last modified by skyper)

What steps will reproduce the problem?

  1. select an object
  2. open add tag dialog
  3. select a key from drop down list (e.g. highway)
    • switch focus to somewhere else in the window ("value", buttons) and back
  4. open list again by pressing "down" from cursor block.
  5. position in list is at the key
  6. press one more "down"
  7. you are on top of list (e.g. access)

What is the expected result?

you are able to continue at the position of the previous selected key

What happens instead?

You jump to top of the list. "Up" does not work at all (used to work though)

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

  • Long time bug. Nothing new (except the "up" key, maybe).
  • Really annoying if you just missed a tag as the list grows all the time.
  • Did not check the value text box so far but the lists usually are much shorter
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-09-02 01:36:00
Last Changed Author: Don-vip
Revision: 7485
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-09-02 02:57:38 +0200 (Tue, 02 Sep 2014)
Last Changed Rev: 7485

Identification: JOSM/1.5 (7485 en) Linux Debian GNU/Linux 7.6 (wheezy)
Memory Usage: 572 MB / 882 MB (130 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u65-2.5.1-5~deb7u1
Dataset consistency test: No problems found

Plugins:
- OpeningHoursEditor (30609)
- conflation (0.1.7)
- imagery-xml-bounds (30495)
- jts (30416)
- mirrored_download (30495)
- notes (v0.9.4)
- photoadjust (30428)
- reverter (30521)
- terracer (30614)
- todo (29154)
- undelete (30416)
- utilsplugin2 (30460)
- wikipedia (30449)

Last errors/warnings:
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$MapCSSTagCheckerAndRule@3e367ac4, code=3000]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$MapCSSTagCheckerAndRule@3e367ac4, code=3000]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$MapCSSTagCheckerAndRule@6503a2f4, code=3000]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$MapCSSTagCheckerAndRule@6503a2f4, code=3000]
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.UnconnectedWays$UnconnectedHighways@d791c68c, code=1301]

Attachments (0)

Change History (16)

comment:1 Changed 5 years ago by Don-vip

Owner: changed from team to skyper
Status: newneedinfo

Works for me with Windows Look-and-feel, can you please try with different look-and-feels to see if it always fails or not? If it fails only for some LAFs please report them here.

comment:2 in reply to:  1 Changed 5 years ago by skyper

Replying to Don-vip:

Works for me with Windows Look-and-feel, can you please try with different look-and-feels to see if it always fails or not? If it fails only for some LAFs please report them here.

Sorry, forgot one important point between 3. and 4. you need to switch the focus to the "value" combo or buttons and back.

Tried all four styles. All show the same behaviour.

Last edited 5 years ago by skyper (previous) (diff)

comment:3 Changed 5 years ago by skyper

Owner: changed from skyper to team
Status: needinfonew

comment:4 Changed 5 years ago by skyper

Description: modified (diff)

comment:5 Changed 5 years ago by Don-vip

Owner: changed from team to skyper
Status: newneedinfo

Still cannot reproduce (Windows, tried Java 7 and 8, plus Windows and Metal look and feels). Can you try on a different machine with another window manager?

comment:6 in reply to:  5 Changed 5 years ago by skyper

Replying to Don-vip:

Still cannot reproduce (Windows, tried Java 7 and 8, plus Windows and Metal look and feels). Can you try on a different machine with another window manager?

Ok, tried different machine with Debian 7.6 (wheezy), LXDE with openbox. Still the same.

comment:7 Changed 5 years ago by Don-vip

Keywords: linux added

comment:8 Changed 5 years ago by skyper

Owner: changed from skyper to team
Status: needinfonew

comment:9 Changed 5 years ago by Hojoe

I can confirme this problem on Windows with Windows l&f.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-09-29 22:12:08
Last Changed Author: Don-vip
Revision: 7588
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-09-29 23:52:43 +0200 (Mon, 29 Sep 2014)
Last Changed Rev: 7588

Identification: JOSM/1.5 (7588 de) Windows 8 64-Bit
Memory Usage: 228 MB / 1810 MB (118 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Also the history combobox in the search dialog has the same problem.

comment:10 Changed 5 years ago by Hojoe

I think the main problem is the wrong 'toString' implementation in AutoCompletionListItem. All classes around the JCombobox (model, renderer, editor,...) uses the toString() method. The toString() method should give the displayed string back. At the moment toString gives something else back. There are many code, that works around, but not good enough.
The best solution is to simplify AutoCompletionListItem#toString():

    @Override public String toString() {
        return value;
    }

I don't know if AutoCompletionListItem#toString() is used somewhere else. It may be that there are some risks.

Last edited 5 years ago by Don-vip (previous) (diff)

comment:11 Changed 5 years ago by Hojoe

Cc: Hojoe added

comment:12 Changed 5 years ago by Don-vip

Ticket #6260 has been marked as a duplicate of this ticket.

comment:13 Changed 5 years ago by Don-vip

Cc: flaimo added

comment:14 Changed 5 years ago by Don-vip

OK I have finally understood the bug and am able to reproduce it. Looking into it...

comment:15 Changed 5 years ago by Don-vip

Milestone: 14.12

comment:16 Changed 5 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 7863/josm:

fix #10470 - fix invalid recognition of items in AutoCompletionComboBox

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.