Bug 198101 [DataBinding] ComboObservableValue fails to clear cached value
ComboObservableValue fails to update cached currentValue during the doSetValue(...) call. As the result, event may not fire if the next combo selection happens to be the same as cached value. Proposed change (new lines end with // FIX): public void modifyText(ModifyEvent e) { if (!updating) { String oldValue = currentValue; currentValue = ComboObservableValue.this.combo.getText(); fireValueChange(Diffs.createValueDiff(oldValue, currentValue)); } else // FIX currentValue = ComboObservableValue.this.combo.getText(); // FIX
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java
private void init() {		
		if (attribute.equals(SWTProperties.SELECTION)
				|| attribute.equals(SWTProperties.TEXT)) {
			this.currentValue = ccombo.getText();
			modifyListener = new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					if (!updating) {
						String oldValue = currentValue;
						currentValue = CComboObservableValue.this.ccombo
								.getText();
						
						notifyIfChanged(oldValue, currentValue);
					}
				}
			};
			ccombo.addModifyListener(modifyListener);
		} else
			throw new IllegalArgumentException();
	}
	public void doSetValue(final Object value) {
		String oldValue = ccombo.getText();
		try {
			updating = true;
			if (attribute.equals(SWTProperties.TEXT)) {
				String stringValue = value != null ? value.toString() : ""; 
				ccombo.setText(stringValue);
			} else if (attribute.equals(SWTProperties.SELECTION)) {
				String items[] = ccombo.getItems();
				int index = -1;