CONVERTED DATA
BugTraq+ Release Management Values
COMMIT TO FIX:
mantis
FIXED IN:
mantis
INTEGRATED IN:
mantis
mantis-b08
|
|
|
SUGGESTED FIX
Name: pzR10082 Date: 10/25/2002
*** /net/diablo/export2/swing/zpm/webrev/src/share/classes/javax/swing/MenuSelectionManager.java- Fri Oct 25 12:15:21 2002
--- MenuSelectionManager.java Fri Oct 25 12:12:21 2002
***************
*** 72,85 ****
}
for(i=currentSelectionCount - 1 ; i >= firstDifference ; i--) {
! ((MenuElement)selection.elementAt(i)).menuSelectionChanged(false);
selection.removeElementAt(i);
}
for(i = firstDifference, c = path.length ; i < c ; i++) {
if (path[i] != null) {
- path[i].menuSelectionChanged(true);
selection.addElement(path[i]);
}
}
--- 72,86 ----
}
for(i=currentSelectionCount - 1 ; i >= firstDifference ; i--) {
! MenuElement me = (MenuElement)selection.elementAt(i);
selection.removeElementAt(i);
+ me.menuSelectionChanged(false);
}
for(i = firstDifference, c = path.length ; i < c ; i++) {
if (path[i] != null) {
selection.addElement(path[i]);
+ path[i].menuSelectionChanged(true);
}
}
***************
*** 104,110 ****
* when a choice has been made
*/
public void clearSelectedPath() {
! setSelectedPath(null);
}
/**
--- 105,113 ----
* when a choice has been made
*/
public void clearSelectedPath() {
! if (selection.size() > 0) {
! setSelectedPath(null);
! }
}
/**
*** /net/diablo/export2/swing/zpm/webrev/src/share/classes/javax/swing/JPopupMenu.java- Fri Oct 25 12:15:20 2002
--- JPopupMenu.java Fri Oct 25 12:13:37 2002
***************
*** 762,767 ****
--- 762,772 ----
popup.hide();
popup = null;
firePropertyChange("visible", Boolean.TRUE, Boolean.FALSE);
+ // 4694797: When popup menu is made invisible, selected path
+ // should be cleared
+ if (isPopupMenu()) {
+ MenuSelectionManager.defaultManager().clearSelectedPath();
+ }
}
if (accessibleContext != null) {
if (b) {
###@###.### 2002-10-25
======================================================================
|
|
|
EVALUATION
I verified this is indeed a regression in 1.4.X. Since having an unresponsive
button is an extremely bad usability problem, I would recommend we consider
fixing this for mantis if the fix isn't too risky.
###@###.### 2002-10-18
Name: pzR10082 Date: 10/25/2002
When JPopupMenu.setVisible(false) is called, menu selection should be
cleared. However, a number of minor problems should be solved beforehand:
* MenuSelectionManager.setSelectedPath() calls menuSelectionChanged()
before the selection has actually changed. If a menu element examines
the selection at this moment, it will see it in an inconsistent state.
* JPopupMenu.setVisible(false) should call
MenuSelectionManager.clearSelectedPath(), so that when a popup menu is
hidden, menu selection is cleared. However, clearSelectedPath() can
hide popup menu when, for example, menu is being canceled.
clearSelectedPath() should be made a no-op if the selection is already
empty. This is so that clearSelectedPath() is not reentered:
reentering clearSelectedPath() causes an exception.
###@###.### 2002-10-25
======================================================================
|
|
|
|