mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-10 23:18:45 +00:00
6470730: Disconnect button leads to wrong popup message
Reviewed-by: dcubed, sla, egahlin
This commit is contained in:
parent
d576d9a662
commit
30482b86cf
@ -55,6 +55,7 @@ public class VMPanel extends JTabbedPane implements PropertyChangeListener {
|
||||
private VMInternalFrame vmIF = null;
|
||||
private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>();
|
||||
private boolean wasConnected = false;
|
||||
private boolean userDisconnected = false;
|
||||
|
||||
// The everConnected flag keeps track of whether the window can be
|
||||
// closed if the user clicks Cancel after a failed connection attempt.
|
||||
@ -125,6 +126,7 @@ public class VMPanel extends JTabbedPane implements PropertyChangeListener {
|
||||
if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) {
|
||||
|
||||
if (isConnected()) {
|
||||
userDisconnected = true;
|
||||
disconnect();
|
||||
wasConnected = false;
|
||||
} else {
|
||||
@ -452,6 +454,11 @@ public class VMPanel extends JTabbedPane implements PropertyChangeListener {
|
||||
private void vmPanelDied() {
|
||||
disconnect();
|
||||
|
||||
if (userDisconnected) {
|
||||
userDisconnected = false;
|
||||
return;
|
||||
}
|
||||
|
||||
JOptionPane optionPane;
|
||||
String msgTitle, msgExplanation, buttonStr;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user