Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21053 closed defect (fixed)

Relation editor: Role unintentionally modified removing member from member list

Reported by: skyper Owned by: DevCharly
Priority: critical Milestone: 21.07
Component: Core Version: latest
Keywords: template_report relation editor member remove role Cc:

Description (last modified by skyper)

What steps will reproduce the problem?

  1. Have a relation with member roles
  2. Open relation editor
  3. Select member with role in member list by clicking on role field
  4. Watch the the role field being active and ready for modification
  5. Delete member from list either with source:trunk/resources/images/dialogs/delete.svg "Remove the currently selected members from this relation" or source:trunk/resources/images/dialogs/relation/deletemembers.svg "Remove all members referring to one of the selected objects"

What is the expected result?

Member is removed from member list but no roles of remaining members are modified

What happens instead?

Role of the member below the removed member is modified

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

Seems to happen all the time if the role field is active for modification, e.g. modifying roles above by typing plus Enter and than removing does trigger it, too.
Noticed this for some time now, but never took the time to fill a ticket, sorry.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-07-28 21:20:51 +0200 (Wed, 28 Jul 2021)
Revision:18097
Build-Date:2021-07-29 01:31:02
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18097 en) Linux Debian GNU/Linux 10 (buster)
Java version: 11.0.12+7-post-Debian-2deb10u1, Debian, OpenJDK 64-Bit Server VM

Look and Feel: com.formdev.flatlaf.FlatDarculaLaf

Plugins:
+ flatlaf (35734)

Attachments (0)

Change History (15)

comment:1 by Don-vip, 3 years ago

Description: modified (diff)

comment:2 by Don-vip, 3 years ago

Owner: changed from team to skyper
Status: newneedinfo

Can't reproduce, can you please attach screenshots with a particular relation id and selected member id to make sure I do the same as you?

in reply to:  2 comment:3 by skyper, 3 years ago

Component: CorePlugin flatlaf

Replying to Don-vip:

Can't reproduce, can you please attach screenshots with a particular relation id and selected member id to make sure I do the same as you?

Oh, it is a problem of the flatlaf plugin at least in "Dark Mode". Wonder that the laf can have that heavy impact.

Look and Feel: com.formdev.flatlaf.FlatDarkLaf

Plugins:
+ flatlaf (35734)
Last edited 3 years ago by skyper (previous) (diff)

comment:4 by skyper, 3 years ago

Owner: changed from skyper to DevCharly
Status: needinfonew

comment:5 by skyper, 3 years ago

Description: modified (diff)

comment:6 by DevCharly, 3 years ago

So the problem is that the role in the table is still in edit mode after pressing delete button in toolbar.
Do I understand this correct?

The problem is probably that toolbar buttons in FlatLaf are not focusable.
So the table does not lose focus when a toolbar button is pressed and does not quit editing...

https://github.com/JFormDesigner/FlatLaf/issues/346

comment:7 by skyper, 3 years ago

It looks like version 1.4 did not make it into the JOSM plugin, so far.

in reply to:  6 comment:8 by skyper, 3 years ago

Replying to DevCharly:

So the problem is that the role in the table is still in edit mode after pressing delete button in toolbar.
Do I understand this correct?

Yes, it is still in edit mode after removing the member, but it does not depend on buttons but also happens with shortcut (Alt+Del).

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

comment:9 by skyper, 3 years ago

Description: modified (diff)

comment:10 by DevCharly, 3 years ago

In 35800/osm:

see #21053 - dist flatlaf.jar v35799

comment:11 by DevCharly, 3 years ago

I've uploaded FlatLaf plugin v35799, which now uses FlatLaf 1.4 with focusable toolbar buttons.

This quits table editing when clicking the delete button.

But this does not fix it for keyboard shortcuts, which happens in all L&Fs and needs a fix in JOSM.
The actions that operate on the table have to stop table cell editing using something like:

if (table.isEditing())
    table.getCellEditor().stopCellEditing();
Last edited 3 years ago by Don-vip (previous) (diff)

comment:12 by skyper, 3 years ago

Component: Plugin flatlafCore

Thanks, indeed, fixed the bug with button actions.

comment:13 by Don-vip, 3 years ago

Milestone: 21.07

comment:14 by Don-vip, 3 years ago

Resolution: fixed
Status: newclosed

In 18118/josm:

fix #21053 - stop cell editing after performing member action in relation editor

in reply to:  11 comment:15 by Don-vip, 3 years ago

Replying to DevCharly:

But this does not fix it for keyboard shortcuts, which happens in all L&Fs and needs a fix in JOSM.
The actions that operate on the table have to stop table cell editing using something like:

if (table.isEditing())
    table.getCellEditor().stopCellEditing();

Thanks a lot for the advice, works fine now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain DevCharly.
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.