Changeset 9368 in josm
- Timestamp:
- 2016-01-09T22:20:46+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r9078 r9368 15 15 16 16 import javax.swing.AbstractAction; 17 import javax.swing.DropMode; 17 18 import javax.swing.JComponent; 18 19 import javax.swing.JPopupMenu; … … 83 84 getActionMap().put("selectNextColumnCell", new SelectNextColumnCellAction()); 84 85 getActionMap().put("selectPreviousColumnCell", new SelectPreviousColumnCellAction()); 86 87 setTransferHandler(new MemberTransferHandler()); 88 setFillsViewportHeight(true); // allow drop on empty table 89 setDragEnabled(true); 90 setDropMode(DropMode.INSERT_ROWS); 85 91 } 86 92 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r9266 r9368 447 447 } 448 448 449 void addMembersAtIndex(final Iterable<RelationMember> newMembers, final int index) { 450 int idx = index; 451 for (RelationMember member : newMembers) { 452 members.add(idx++, member); 453 } 454 fireTableRowsInserted(index, idx - 1); 455 } 456 449 457 public void addMembersAtBeginning(List<? extends OsmPrimitive> primitives) { 450 458 addMembersAtIndex(primitives, 0);
Note:
See TracChangeset
for help on using the changeset viewer.