Changeset 3920 in josm


Ignore:
Timestamp:
2011-02-20T16:58:49+01:00 (14 years ago)
Author:
jttt
Message:

Paste in relation dialog - paste after last member when nothing is selecting

File:
1 edited

Legend:

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

    r3640 r3920  
    15451545
    15461546                toAdd = filterConfirmedPrimitives(toAdd);
    1547                 memberTableModel.addMembersAfterIdx(toAdd, memberTableModel
    1548                         .getSelectionModel().getMaxSelectionIndex());
     1547                int index = memberTableModel.getSelectionModel().getMaxSelectionIndex();
     1548                if (index == -1) {
     1549                    index = memberTableModel.getRowCount() - 1;
     1550                }
     1551                memberTableModel.addMembersAfterIdx(toAdd, index);
    15491552
    15501553                tfRole.requestFocusInWindow();
Note: See TracChangeset for help on using the changeset viewer.