mianalysis / mia

Modular, object-based analysis for ImageJ/Fiji
GNU General Public License v3.0
11 stars 2 forks source link

Module paste not working on Mac #160

Open sjcross opened 1 year ago

sjcross commented 1 year ago

When copying and pasting a module on Mac the following error occurs:

Exception in thread "Run$_AWT-EventQueue-0" java.lang.IllegalStateException: Not a drop at javax.swing.TransferHandler$TransferSupport.assureIsDrop(TransferHandler.java:339) at javax.swing.TransferHandler$TransferSupport.getDropLocation(TransferHandler.java:360) at io.github.mianalysis.mia.gui.regions.workflowmodules.DraggableTransferHandler.importData(DraggableTransferHandler.java:57) at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1766) at javax.swing.TransferHandler$TransferAction.access$800(TransferHandler.java:1692) at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1715) at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1713) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1730) at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1728) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1727) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1668) at javax.swing.JComponent.processKeyBinding(JComponent.java:2882) at javax.swing.JTable.processKeyBinding(JTable.java:5265) at javax.swing.JComponent.processKeyBindings(JComponent.java:2943) at javax.swing.JComponent.processKeyEvent(JComponent.java:2845) at java.awt.Component.processEvent(Component.java:6316) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:834) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1102) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:973) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:799) at java.awt.Component.dispatchEventImpl(Component.java:4760) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

sjcross commented 1 year ago

Actually, Ctrl+C and Ctrl+V work, but on Mac should also accept cmd+C and cmd+V. The above error may be because a different (non-module) item was in the system clipboard.