Revision 45296

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featurequery/DefaultFeatureQueryCalculatedColumnsPanel.java
5 5
import java.awt.event.ActionListener;
6 6
import java.net.URL;
7 7
import java.util.List;
8
import java.util.logging.Level;
8 9
import javax.swing.DefaultListModel;
9 10
import javax.swing.DefaultListSelectionModel;
10 11
import javax.swing.ImageIcon;
......
225 226
            this.txtName.setText(attr.getName());
226 227
            FeatureAttributeEmulatorExpression emu = (FeatureAttributeEmulatorExpression) attr.getFeatureAttributeEmulator();
227 228
            if (emu != null) {
228
                this.expPicker.set(emu.getExpression());
229
                try {
230
                    this.expPicker.set(emu.getExpression().clone());
231
                } catch (CloneNotSupportedException ex) {
232
                    LOGGER.warn("Not able to clone expression.", ex);
233
                    throw new RuntimeException(ex);
234
                }
229 235
            }
230 236
            this.pickerDataType.set(attr.getDataType());
231 237
            Coercion coerceString = ToolsLocator.getDataTypesManager().get(DataTypes.STRING).getCoercion();
......
261 267

  
262 268
        public EditableFeatureAttributeDescriptor fetch(EditableFeatureAttributeDescriptor attr) {
263 269
            attr.setName(this.txtName.getText());
264
            attr.setFeatureAttributeEmulator(this.expPicker.get());
270
            try {
271
                attr.setFeatureAttributeEmulator(this.expPicker.get().clone());
272
            } catch (CloneNotSupportedException ex) {
273
                LOGGER.warn("Not able to clone expression.", ex);
274
                throw new RuntimeException(ex);
275
            }
265 276
            attr.setDataType(this.pickerDataType.get());
266 277
            Coercion coerceInteger = ToolsLocator.getDataTypesManager().get(DataTypes.INTEGER).getCoercion();
267 278
            try {

Also available in: Unified diff