Revision 44507
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/featuretype/DefaultFeatureTypePanel.java | ||
---|---|---|
467 | 467 |
if( !(type instanceof EditableFeatureType) ) { |
468 | 468 |
this.setMode(MODE_SHOW_ONLY); |
469 | 469 |
} |
470 |
this.tableModel = new FeatureTypeTableModel(type); |
|
470 |
this.tableModel = new FeatureTypeTableModel(this.featureType);
|
|
471 | 471 |
this.tblFields.setModel(this.tableModel); |
472 | 472 |
if( type!=null && !type.isEmpty() ) { |
473 | 473 |
this.tblFields.getSelectionModel().setSelectionInterval(0, 0); |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java | ||
---|---|---|
1137 | 1137 |
} |
1138 | 1138 |
// Si hay campos nuevos -> false |
1139 | 1139 |
for (FeatureAttributeDescriptor attr : this) { |
1140 |
if( old.getAttributeDescriptor(attr.getName())==null ) {
|
|
1140 |
if(!attr.isComputed() && old.getAttributeDescriptor(attr.getName())==null) {
|
|
1141 | 1141 |
return false; |
1142 | 1142 |
} |
1143 | 1143 |
} |
1144 | 1144 |
|
1145 | 1145 |
// Si se ha eliminado algun campo -> false |
1146 | 1146 |
for (FeatureAttributeDescriptor attr : old) { |
1147 |
if( this.getAttributeDescriptor(attr.getName())==null ) { |
|
1147 |
if(!attr.isComputed() && this.getAttributeDescriptor(attr.getName())==null ) {
|
|
1148 | 1148 |
return false; |
1149 | 1149 |
} |
1150 | 1150 |
} |
... | ... | |
1153 | 1153 |
// los campos uno a uno. |
1154 | 1154 |
for (FeatureAttributeDescriptor attr : this) { |
1155 | 1155 |
FeatureAttributeDescriptor attrold = old.getAttributeDescriptor(attr.getName()); |
1156 |
if( !attr.hasOnlyMetadataChanges(attrold) ) { |
|
1156 |
if(!attr.isComputed() && !attr.hasOnlyMetadataChanges(attrold) ) {
|
|
1157 | 1157 |
return false; |
1158 | 1158 |
} |
1159 | 1159 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java | ||
---|---|---|
1235 | 1235 |
throw new NullFeatureTypeException(getName()); |
1236 | 1236 |
} |
1237 | 1237 |
if (mode == MODE_QUERY && type.hasOnlyMetadataChanges(this.defaultFeatureType)) { |
1238 |
FeatureType theType = type.getCopy(); |
|
1238 |
notifyChange(FeatureStoreNotification.BEFORE_UPDATE_TYPE, type); |
|
1239 |
FeatureType theType = type.getNotEditableCopy(); |
|
1239 | 1240 |
if( defaultFeatureType.getId().equals(theType.getId()) ) { |
1240 | 1241 |
defaultFeatureType = theType; |
1241 | 1242 |
} |
... | ... | |
1249 | 1250 |
} |
1250 | 1251 |
this.featureTypes = newtypes; |
1251 | 1252 |
saveDALFile(); |
1253 |
notifyChange(FeatureStoreNotification.AFTER_UPDATE_TYPE, type); |
|
1252 | 1254 |
return ; |
1253 | 1255 |
} |
1254 | 1256 |
boolean typehasStrongChanges = ((DefaultEditableFeatureType) type).hasStrongChanges(); |
Also available in: Unified diff