From 09cb46c4fb17eb93d44be21e42490f58ea4cb7bf Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 6 Oct 2007 21:15:20 +0000 Subject: [PATCH] Explicitly re-enabling the Serial Port menu if we add something to it when refreshing it. Otherwise, on Windows it stays disabled even though it's no longer empty. --- app/Editor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Editor.java b/app/Editor.java index c670d83a8..16cb24d23 100644 --- a/app/Editor.java +++ b/app/Editor.java @@ -951,6 +951,7 @@ public class Editor extends JFrame //System.out.println("Clearing serial port menu."); serialMenu.removeAll(); + boolean empty = true; try { @@ -966,8 +967,13 @@ public class Editor extends JFrame rbMenuItem.addActionListener(serialMenuListener); //serialGroup.add(rbMenuItem); serialMenu.add(rbMenuItem); + empty = false; } } + if (!empty) { + //System.out.println("enabling the serialMenu"); + serialMenu.setEnabled(true); + } }