Ticket #1988: toolbar_preferences_java5_fix.patch

File toolbar_preferences_java5_fix.patch, 1.4 KB (added by anonymous, 17 years ago)
  • src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

     
    197197            @Override
    198198            public boolean importData(JComponent comp, Transferable t) {
    199199                try {
    200                     int dropIndex = selectedList.locationToIndex(selectedList.getDropLocation().getDropPoint());
     200                    int dropIndex = selectedList.locationToIndex(selectedList.getMousePosition(true));
    201201                    Object[] draggedData = (Object[]) t.getTransferData(ACTION_FLAVOR);
    202202
    203203                    Object leadItem = dropIndex >= 0 ? selected.elementAt(dropIndex) : null;
     
    408408    }
    409409
    410410    public boolean ok() {
    411         StringBuilder b = new StringBuilder();
    412411        Collection<String> t = new LinkedList<String>();
    413412        for (int i = 0; i < selected.size(); ++i) {
    414413            if (selected.get(i) == null)
     
    425424     * @return The parameter (for better chaining)
    426425     */
    427426    public Action register(Action action) {
    428 //        actions.put((String) action.getValue("toolbar"), action);
     427        actions.put((String) action.getValue("toolbar"), action);
    429428        return action;
    430429    }
    431430