Changeset 2945 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
- Timestamp:
- 06.02.2010 09:37:48 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r2930 r2945 137 137 */ 138 138 private final void resolve() { 139 if (conflicts == null) return; 140 if (conflicts.size() == 1) { 141 lstConflicts.setSelectedIndex(0); 142 } 143 144 if (lstConflicts.getSelectedIndex() == -1) 145 return; 146 147 int [] selectedRows = lstConflicts.getSelectedIndices(); 148 if (selectedRows == null || selectedRows.length == 0) 149 return; 150 int row = selectedRows[0]; 151 Conflict<?> c = conflicts.get(row); 139 if (conflicts == null || model.getSize() == 0) return; 140 141 int index = lstConflicts.getSelectedIndex(); 142 if (index < 0) { 143 index = 0; 144 } 145 146 Conflict<?> c = conflicts.get(index); 152 147 OsmPrimitive my = c.getMy(); 153 148 OsmPrimitive their = c.getTheir(); … … 155 150 dialog.getConflictResolver().populate(my, their); 156 151 dialog.setVisible(true); 152 153 lstConflicts.setSelectedIndex(index); 154 157 155 Main.map.mapView.repaint(); 158 156 }
Note: See TracChangeset
for help on using the changeset viewer.
