diff --git a/megameklab/src/megameklab/ui/MegaMekLabTabbedUI.java b/megameklab/src/megameklab/ui/MegaMekLabTabbedUI.java index a8dcda781..aeca7bdce 100644 --- a/megameklab/src/megameklab/ui/MegaMekLabTabbedUI.java +++ b/megameklab/src/megameklab/ui/MegaMekLabTabbedUI.java @@ -553,6 +553,18 @@ public void mouseClicked(MouseEvent e) { } } }); + + addMouseListener( + new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + // middle click to close tab + if (e.getButton() == MouseEvent.BUTTON2 && editor.safetyPrompt()) { + closeTabAt(editors.indexOf(editor)); + } + } + } + ); } }