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
/*******************************************************************************
 * Copyright (c) 2005, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Brad Reynolds - bug 164653
 *     Ashley Cambrell - bug 198904
 *******************************************************************************/
package org.eclipse.jface.internal.databinding.internal.swt;
import org.eclipse.core.databinding.observable.Diffs;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
import org.eclipse.jface.util.Assert;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
/**
 * @since 3.2
 * 
 */
public class CComboObservableValue extends AbstractSWTObservableValue {