Changeset 9993 in josm for trunk/src/org


Ignore:
Timestamp:
2016-03-14T20:28:28+01:00 (9 years ago)
Author:
simon04
Message:

fix #12617 - Unexpected deletion of members by drag-n-drop in relation editor

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/relation
Files:
2 edited

Legend:

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

    r9657 r9993  
    460460    }
    461461
    462     void addMembersAtIndex(final Iterable<RelationMember> newMembers, final int index) {
     462    void addMembersAtIndexKeepingOldSelection(final Iterable<RelationMember> newMembers, final int index) {
    463463        int idx = index;
    464464        for (RelationMember member : newMembers) {
     
    466466        }
    467467        invalidateConnectionType();
     468        final List<Integer> selection = getSelectedIndices();
    468469        fireTableRowsInserted(index, idx - 1);
     470        setSelectedMembersIdx(selection);
    469471    }
    470472
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTransferHandler.java

    r9711 r9993  
    107107            }
    108108        }
    109         destination.getMemberTableModel().addMembersAtIndex(membersToAdd, insertRow);
     109        destination.getMemberTableModel().addMembersAtIndexKeepingOldSelection(membersToAdd, insertRow);
    110110    }
    111111
Note: See TracChangeset for help on using the changeset viewer.