- Timestamp:
- 2023-07-26T22:06:14+02:00 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r18778 r18783 322 322 private synchronized boolean isConflictSelected() { 323 323 final ListSelectionModel selModel = lstConflicts.getSelectionModel(); 324 return selModel.getMinSelectionIndex() >= 0 && selModel.getMaxSelectionIndex() >= selModel.getMinSelectionIndex(); 324 final int minSelectionIndex = selModel.getMinSelectionIndex(); 325 final int maxSelectionIndex = selModel.getMaxSelectionIndex(); 326 final int maxIndex = conflicts.size(); 327 // if minSelectionIndex < 0, nothing is selected 328 // if minSelectionIndex > maxIndex, then nothing is selected (we are operating with an old selection context, most likely) 329 // if maxSelectionIndex < minSelectionIndex, _something_ funny is going on. Or there was a typo in the original code. 330 return minSelectionIndex >= 0 && maxIndex > minSelectionIndex && maxSelectionIndex >= minSelectionIndex; 325 331 } 326 332 … … 369 375 btnResolveMy.setVisible(ExpertToggleAction.isExpert()); 370 376 btnResolveTheir.setVisible(ExpertToggleAction.isExpert()); 377 ((ResolveAction) btnResolveMy.getAction()).valueChanged(null); 378 ((ResolveAction) btnResolveTheir.getAction()).valueChanged(null); 371 379 } 372 380 … … 529 537 } 530 538 } 531 UndoRedoHandler.getInstance().add(new SequenceCommand(name, commands)); 539 UndoRedoHandler.getInstance().add(new SequenceCommand(name, commands)); 532 540 refreshView(); 533 541 }
Note:
See TracChangeset
for help on using the changeset viewer.