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.

This commit is contained in:
David A. Mellis 2007-10-06 21:15:20 +00:00
parent c78c1efe18
commit 09cb46c4fb
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}
}