I commited this patch to fix a failing Mauve test: 2005-10-18 David Gilbert <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicComboBoxUI.java (installComponents): only set default editor if the current editor is null or implements UIResource, (uninstallComponents): only clear editor if it implements UIResource. Regards, Dave
Index: javax/swing/plaf/basic/BasicComboBoxUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v retrieving revision 1.24 diff -u -r1.24 BasicComboBoxUI.java --- javax/swing/plaf/basic/BasicComboBoxUI.java 18 Oct 2005 11:05:10 -0000 1.24 +++ javax/swing/plaf/basic/BasicComboBoxUI.java 18 Oct 2005 15:12:59 -0000 @@ -476,8 +476,12 @@ configureArrowButton(); comboBox.add(arrowButton); - comboBox.setEditor(createEditor()); - editor = comboBox.getEditor().getEditorComponent(); + ComboBoxEditor currentEditor = comboBox.getEditor(); + if (currentEditor == null || currentEditor instanceof UIResource) + { + comboBox.setEditor(createEditor()); + editor = comboBox.getEditor().getEditorComponent(); + } comboBox.revalidate(); } @@ -499,8 +503,14 @@ comboBox.setRenderer(null); - comboBox.setEditor(null); - editor = null; + // if the editor is not an instanceof UIResource, it was not set by the + // UI delegate, so don't clear it... + ComboBoxEditor currentEditor = comboBox.getEditor(); + if (currentEditor instanceof UIResource) + { + comboBox.setEditor(null); + editor = null; + } } /**
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches