Index: src/org/openide/NotifyDescriptor.java =================================================================== RCS file: /cvs/openide/src/org/openide/NotifyDescriptor.java,v --- src/org/openide/NotifyDescriptor.java 24 Apr 2003 20:15:48 -0000 1.43 +++ src/org/openide/NotifyDescriptor.java 8 Aug 2003 13:25:41 -0000 @@ -432,9 +432,17 @@ } return null; } + + /** + * Sets the value w/o firing property change. The caller this is responsible + * to notify this change. + */ + void _setValue (Object newValue) { + value = newValue; + } /** - * Set the value the user has chosen. + * Set the value the user has chosen and fires appropriate property change. * You probably do not want to call this yourself, of course. * * @param newValue the chosen value @@ -443,7 +451,7 @@ */ public void setValue(Object newValue) { Object oldValue = value; - value = newValue; + _setValue (newValue); firePropertyChange(PROP_VALUE, oldValue, newValue); } Index: src/org/openide/WizardDescriptor.java =================================================================== RCS file: /cvs/openide/src/org/openide/WizardDescriptor.java,v --- src/org/openide/WizardDescriptor.java 8 Aug 2003 11:46:47 -0000 1.88 +++ src/org/openide/WizardDescriptor.java 8 Aug 2003 13:25:42 -0000 @@ -499,6 +499,7 @@ // nextButton.setVisible (next); // finishButton.setVisible (!next || (current instanceof FinishPanel)); + // ??? Why set value to NEXT_OPTION? if (next) { setValue (nextButton); } else { @@ -800,10 +801,16 @@ //Bugfix #25820: Call resetWizard to make sure that storeSettings //is called before propertyChange. Object convertedValue = backConvertOption(value); + + // set new value w/o fire PROP_VALUE change + Object oldValue = getValue (); + _setValue (convertedValue); + if (convertedValue == OK_OPTION) { resetWizard(); } - super.setValue(backConvertOption(value)); + // notify listeners about PROP_VALUE change + firePropertyChange (PROP_VALUE, oldValue, convertedValue); // #17360: Reset wizard on CLOSED_OPTION too. if(value == CLOSED_OPTION) { @@ -1136,17 +1143,21 @@ } if (ev.getSource () == finishButton) { + Object oldValue = getValue (); + _setValue (OK_OPTION); if (Arrays.asList(getClosingOptions()).contains(finishButton)) { resetWizard(); } - setValue (OK_OPTION); + firePropertyChange (PROP_VALUE, oldValue, OK_OPTION); } if (ev.getSource () == cancelButton) { + Object oldValue = getValue (); + _setValue (CANCEL_OPTION); if (Arrays.asList(getClosingOptions()).contains(cancelButton)) { resetWizard(); } - setValue (CANCEL_OPTION); + firePropertyChange (PROP_VALUE, oldValue, CANCEL_OPTION); } } }