Ticket #1988: toolbar_preferences_java5_fix.patch
File toolbar_preferences_java5_fix.patch, 1.4 KB (added by , 17 years ago) |
---|
-
src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
197 197 @Override 198 198 public boolean importData(JComponent comp, Transferable t) { 199 199 try { 200 int dropIndex = selectedList.locationToIndex(selectedList.get DropLocation().getDropPoint());200 int dropIndex = selectedList.locationToIndex(selectedList.getMousePosition(true)); 201 201 Object[] draggedData = (Object[]) t.getTransferData(ACTION_FLAVOR); 202 202 203 203 Object leadItem = dropIndex >= 0 ? selected.elementAt(dropIndex) : null; … … 408 408 } 409 409 410 410 public boolean ok() { 411 StringBuilder b = new StringBuilder();412 411 Collection<String> t = new LinkedList<String>(); 413 412 for (int i = 0; i < selected.size(); ++i) { 414 413 if (selected.get(i) == null) … … 425 424 * @return The parameter (for better chaining) 426 425 */ 427 426 public Action register(Action action) { 428 //actions.put((String) action.getValue("toolbar"), action);427 actions.put((String) action.getValue("toolbar"), action); 429 428 return action; 430 429 } 431 430