Modify

Opened 19 months ago

Closed 18 months ago

Last modified 18 months 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 Changed 19 months ago by Don-vip

Description: modified (diff)

comment:2 Changed 19 months ago by Don-vip

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?

comment:3 in reply to:  2 Changed 19 months ago by skyper

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 18 months ago by skyper (previous) (diff)

comment:4 Changed 19 months ago by skyper

Owner: changed from skyper to DevCharly
Status: needinfonew

comment:5 Changed 19 months ago by skyper

Description: modified (diff)

comment:6 Changed 18 months ago by 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?

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 Changed 18 months ago by skyper

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

comment:8 in reply to:  6 Changed 18 months ago by skyper

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 18 months ago by skyper (previous) (diff)

comment:9 Changed 18 months ago by skyper

Description: modified (diff)

comment:10 Changed 18 months ago by DevCharly

In 35800/osm:

see #21053 - dist flatlaf.jar v35799

comment:11 Changed 18 months ago by DevCharly

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 18 months ago by Don-vip (previous) (diff)

comment:12 Changed 18 months ago by skyper

Component: Plugin flatlafCore

Thanks, indeed, fixed the bug with button actions.

comment:13 Changed 18 months ago by Don-vip

Milestone: 21.07

comment:14 Changed 18 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 18118/josm:

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

comment:15 in reply to:  11 Changed 18 months ago by Don-vip

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.