mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-23 04:11:54 -04:00
adds Mac support for paste functionality in data editor, see #711
This commit is contained in:
parent
500c6cdcfd
commit
c48872d135
@ -182,7 +182,7 @@ public class DataEditor extends JDialog {
|
||||
setJMenuBar(menuBar);
|
||||
}
|
||||
|
||||
AbstractAction pasteAction = new AbstractAction("Paste") {
|
||||
new ToolTipAction(Lang.get("menu_paste")) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
@ -193,9 +193,7 @@ public class DataEditor extends JDialog {
|
||||
new ErrorMessage(Lang.get("msg_errorPastingData")).addCause(e1).show();
|
||||
}
|
||||
}
|
||||
};
|
||||
table.getInputMap().put(KeyStroke.getKeyStroke("control V"), "myPaste");
|
||||
table.getActionMap().put("myPaste", pasteAction);
|
||||
}.setAcceleratorCTRLplus('V').enableAcceleratorIn(table);
|
||||
|
||||
pack();
|
||||
if (getWidth() < 150)
|
||||
|
Loading…
x
Reference in New Issue
Block a user