Changeset 10847 in josm for trunk/src


Ignore:
Timestamp:
2016-08-18T21:28:57+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13378 - IllegalStateException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java

    r10604 r10847  
    88import javax.swing.TransferHandler.TransferSupport;
    99
     10import org.openstreetmap.josm.Main;
    1011import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
    1112import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;
     
    3334    @Override
    3435    public void actionPerformed(ActionEvent e) {
    35         new MemberTransferHandler().importData(getSupport());
     36        try {
     37            new MemberTransferHandler().importData(getSupport());
     38        } catch (IllegalStateException ex) {
     39            Main.error(ex);
     40        }
    3641    }
    3742
     
    4247    @Override
    4348    protected void updateEnabledState() {
    44         setEnabled(new MemberTransferHandler().canImport(getSupport()));
     49        try {
     50            setEnabled(new MemberTransferHandler().canImport(getSupport()));
     51        } catch (IllegalStateException ex) {
     52            Main.error(ex);
     53        }
    4554    }
    4655
Note: See TracChangeset for help on using the changeset viewer.