Changeset 32809 in osm for applications/editors


Ignore:
Timestamp:
2016-08-15T11:50:48+02:00 (8 years ago)
Author:
donvip
Message:

fix #josm13321 - IllegalStateException: cannot open system clipboard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java

    r32725 r32809  
    109109    @Override
    110110    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
    111         setEnabled(selection != null && !selection.isEmpty()
    112                 && ClipboardUtils.getClipboard().isDataFlavorAvailable(PrimitiveTransferData.DATA_FLAVOR));
     111        try {
     112            setEnabled(selection != null && !selection.isEmpty()
     113                    && ClipboardUtils.getClipboard().isDataFlavorAvailable(PrimitiveTransferData.DATA_FLAVOR));
     114        } catch (IllegalStateException e) {
     115            Main.warn(e);
     116        }
    113117    }
    114118}
Note: See TracChangeset for help on using the changeset viewer.