diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2024-07-08 23:40:46 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-08 15:40:46 +0200 |
| commit | d929b60c6817be79a85513635a733384567217bd (patch) | |
| tree | be5e5d3d7ddde7ddc4820e5f2eec4d8255ef75bc /src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | |
| parent | 24b755c74439ec10860402c34b83e0ec9bb90c28 (diff) | |
| download | notenoughupdates-d929b60c6817be79a85513635a733384567217bd.tar.gz notenoughupdates-d929b60c6817be79a85513635a733384567217bd.tar.bz2 notenoughupdates-d929b60c6817be79a85513635a733384567217bd.zip | |
meta: Add clipboard caching (#1229)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 0a7b3378..087365e0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -87,7 +87,6 @@ import org.lwjgl.opengl.GL14; import org.lwjgl.util.vector.Vector2f; import java.awt.*; -import java.awt.datatransfer.StringSelection; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.math.BigDecimal; @@ -1079,9 +1078,7 @@ public class NEUOverlay extends Gui { BigDecimal calculate = Calculator.calculate(textField.getText(), PROVIDE_LOWEST_BIN); textField.setText(calculate.toPlainString()); if (NotEnoughUpdates.INSTANCE.config.toolbar.copyToClipboardWhenGettingResult) { - Toolkit.getDefaultToolkit().getSystemClipboard() - .setContents(new StringSelection(calculate.toPlainString()), null); - + Utils.copyToClipboard(calculate.toPlainString()); } } catch (Calculator.CalculatorException | IllegalStateException | HeadlessException ignored) { } |
