mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-17 02:35:09 +00:00
Merge pull request #659 from matthew16550/macos-copy
Fix copy to clipboard on Mac
This commit is contained in:
commit
3c286fdbaa
@ -388,10 +388,14 @@ class ImageWindow extends JFrame {
|
||||
if (generatedImage == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final File png = generatedImage.getPngFile();
|
||||
final Image image = Toolkit.getDefaultToolkit().createImage(png.getAbsolutePath());
|
||||
final Image image = ImageIO.read(png);
|
||||
final ImageSelection imgSel = new ImageSelection(image);
|
||||
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imgSel, null);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public SimpleLine getSimpleLine() {
|
||||
|
Loading…
Reference in New Issue
Block a user