Skip to content

Commit

Permalink
26.05.2024 fixed enabling paste menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
tstamborski committed May 26, 2024
1 parent 39c0e5a commit 890fab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public MainWindow() {
});
timer.start();

getToolkit().getSystemClipboard().addFlavorListener(fe ->
enableClipboardMenuItems(memoryPanel.getMemoryView().getSelection()));
memoryPanel.getMemoryView().addSelectionListener((se)->{
editorPanel.setSelection(se.getSelection());
enableClipboardMenuItems(se.getSelection());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public MemoryView(int zoom, int columns) {
popup.add(pasteMenuItem);
popup.addSeparator();
popup.add(deleteMenuItem);

getToolkit().getSystemClipboard().addFlavorListener(fe -> enablePopupMenuItems());
}

public void cut() {
Expand Down

0 comments on commit 890fab4

Please sign in to comment.