mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
improve label cell performance by avoiding clipboard retrieval
This commit is contained in:
parent
1eb595823b
commit
77fde3cda9
1 changed files with 9 additions and 12 deletions
|
@ -92,8 +92,6 @@ class LabelCell extends TextFieldTreeTableCell<Entry, String> {
|
||||||
});
|
});
|
||||||
getItems().add(copyLabel);
|
getItems().add(copyLabel);
|
||||||
|
|
||||||
Object content = Clipboard.getSystemClipboard().getContent(DataFormat.PLAIN_TEXT);
|
|
||||||
if(content instanceof String) {
|
|
||||||
MenuItem pasteLabel = new MenuItem("Paste Label");
|
MenuItem pasteLabel = new MenuItem("Paste Label");
|
||||||
pasteLabel.setOnAction(AE -> {
|
pasteLabel.setOnAction(AE -> {
|
||||||
hide();
|
hide();
|
||||||
|
@ -105,5 +103,4 @@ class LabelCell extends TextFieldTreeTableCell<Entry, String> {
|
||||||
getItems().add(pasteLabel);
|
getItems().add(pasteLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue