Revision 6604 trunk/extensions/extCAD/src/com/iver/cit/gvsig/StopEditing.java
StopEditing.java | ||
---|---|---|
66 | 66 |
for (int i = 0; i < actives.length; i++) { |
67 | 67 |
if (actives[i] instanceof FLyrVect && actives[i].isEditing()) { |
68 | 68 |
FLyrVect lv = (FLyrVect) actives[i]; |
69 |
MapControl mapControl = (MapControl) vista.getMapControl();
|
|
69 |
MapControl mapControl = vista.getMapControl(); |
|
70 | 70 |
VectorialLayerEdited lyrEd = (VectorialLayerEdited) edMan.getActiveLayerEdited(); |
71 | 71 |
lyrEd.clearSelection(); |
72 | 72 |
isStop=stopEditing(lv, mapControl); |
... | ... | |
133 | 133 |
vea.getCommandRecord().removeCommandListener(mapControl); |
134 | 134 |
layer.setEditing(false); |
135 | 135 |
return true; |
136 |
} else {// Si no existe writer para la capa que tenemos en edici?n |
|
136 |
} |
|
137 |
// Si no existe writer para la capa que tenemos en edici?n |
|
137 | 138 |
resp = JOptionPane |
138 | 139 |
.showConfirmDialog( |
139 | 140 |
(Component) PluginServices.getMainFrame(), |
... | ... | |
154 | 155 |
layer.setEditing(false); |
155 | 156 |
return true; |
156 | 157 |
} |
157 |
} |
|
158 |
|
|
158 | 159 |
} catch (EditionException e) { |
159 | 160 |
NotificationManager.addError(e); |
160 | 161 |
} catch (IOException e) { |
... | ... | |
187 | 188 |
} |
188 | 189 |
} |
189 | 190 |
vea.cleanSelectableDatasource(); |
190 |
layer.setRecordset(vea.getRecordset()); // Queremos que el recordset del layer
|
|
191 |
layer.setRecordset(vea.getRecordset()); // Queremos que el recordset del layer |
|
191 | 192 |
// refleje los cambios en los campos. |
192 | 193 |
ILayerDefinition lyrDef = EditionUtilities.createLayerDefinition(layer); |
193 | 194 |
String aux="FIELDS:"; |
194 |
FieldDescription[] flds = lyrDef.getFieldsDesc();
|
|
195 |
FieldDescription[] flds = lyrDef.getFieldsDesc(); |
|
195 | 196 |
for (int i=0; i < flds.length; i++) |
196 | 197 |
{ |
197 |
aux = aux + ", " + flds[i].getFieldAlias();
|
|
198 |
aux = aux + ", " + flds[i].getFieldAlias(); |
|
198 | 199 |
} |
199 |
System.err.println("Escribiendo la capa " + lyrDef.getName() +
|
|
200 |
System.err.println("Escribiendo la capa " + lyrDef.getName() + |
|
200 | 201 |
" con los campos " + aux); |
201 | 202 |
writer.initialize(lyrDef); |
202 | 203 |
vea.stopEdition(writer, EditionEvent.GRAPHIC); |
... | ... | |
222 | 223 |
public boolean isVisible() { |
223 | 224 |
if (EditionUtilities.getEditionStatus() == EditionUtilities.EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE) |
224 | 225 |
return true; |
225 |
else |
|
226 |
return false; |
|
226 |
return false; |
|
227 | 227 |
|
228 | 228 |
} |
229 | 229 |
} |
Also available in: Unified diff