Changeset 16454 in josm


Ignore:
Timestamp:
2020-05-17T20:04:35+02:00 (3 weeks ago)
Author:
simon04
Message:

fix #17952 - Relation Manager: adjust focus in member tab when removing selected members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java

    r14690 r16454  
    3434    @Override
    3535    public void actionPerformed(ActionEvent e) {
    36         editorAccess.getMemberTableModel().remove(editorAccess.getMemberTable().getSelectedRows());
     36        int[] selectedRows = editorAccess.getMemberTable().getSelectedRows();
     37        editorAccess.getMemberTableModel().remove(selectedRows);
     38        if (selectedRows.length > 0 && editorAccess.getMemberTableModel().getRowCount() > selectedRows[0]) {
     39            // make first row of former selection visible, see #17952
     40            editorAccess.getMemberTable().makeMemberVisible(selectedRows[0]);
     41        }
    3742    }
    3843
Note: See TracChangeset for help on using the changeset viewer.