Changeset 18601 in josm for trunk


Ignore:
Timestamp:
2022-11-21T22:49:28+01:00 (2 years ago)
Author:
taylor.smock
Message:

Fix #20528: Copy does not work from the welcome screen

This was caused by setting the TransferHandler to null in order to get
drag and drop working. Instead of setting the TransferHandler to null, we
just set the DropTarget to null, which is what prevents the parent
DropTarget from being triggered.

The DropTarget could also have it's setActive method called with false,
but this will hopefully be less surprising.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/GettingStarted.java

    r17806 r18601  
    6262            + "</style>\n";
    6363
     64    /**
     65     * A subclass of {@link JosmEditorPane} which replaces links with something clickable (uses {@link OpenBrowser})
     66     * @since 623
     67     */
    6468    public static class LinkGeneral extends JosmEditorPane implements HyperlinkListener {
    6569
     
    144148        lg.getInputMap(JComponent.WHEN_FOCUSED).put(MenuItemSearchDialog.Action.SHORTCUT.getKeyStroke(), "none");
    145149        lg.getInputMap(JComponent.WHEN_FOCUSED).put(HistoryInfoAction.SHORTCUT.getKeyStroke(), "none");
    146         lg.setTransferHandler(null);
     150        // Don't use the text handler drag and drop behavior. See #13196/#20528.
     151        lg.setDropTarget(null);
    147152
    148153        JScrollPane scroller = new JScrollPane(lg);
Note: See TracChangeset for help on using the changeset viewer.