Revision 38885 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/StopEditing.java
StopEditing.java | ||
---|---|---|
91 | 91 |
lv.getFeatureStore().deleteObserver(lyrEd); |
92 | 92 |
isStop = stopEditing(lv, mapControl); |
93 | 93 |
if (isStop) { |
94 |
lv.getFeatureStore().deleteObserver(vista); |
|
94 | 95 |
lv.removeLayerListener(edMan); |
95 | 96 |
mapControl.getMapContext().removeLayerDrawListener( |
96 | 97 |
lyrEd); |
... | ... | |
105 | 106 |
} |
106 | 107 |
} |
107 | 108 |
if (isStop) { |
108 |
vista.getMapControl().setTool("zoomIn"); |
|
109 |
vista.hideConsole(); |
|
110 |
vista.repaintMap(); |
|
111 | 109 |
CADExtension.clearView(); |
112 |
|
|
110 |
|
|
113 | 111 |
} |
114 | 112 |
} |
115 | 113 |
PluginServices.getMainFrame().enableControls(); |
... | ... | |
157 | 155 |
if (resp == JOptionPane.YES_OPTION) { |
158 | 156 |
// SAVE |
159 | 157 |
saveLayer(layer); |
160 |
layer.setEditing(false); |
|
158 |
// layer.setEditing(false);
|
|
161 | 159 |
return true; |
162 | 160 |
} else if (resp == JOptionPane.NO_OPTION) { |
163 | 161 |
// CANCEL EDITING |
164 | 162 |
cancelEdition(layer); |
165 |
layer.setEditing(false); |
|
163 |
// layer.setEditing(false);
|
|
166 | 164 |
return true; |
167 | 165 |
} else if (resp == JOptionPane.CANCEL_OPTION) { |
168 | 166 |
// CONTINUE EDITING |
... | ... | |
198 | 196 |
options[2]); |
199 | 197 |
if (resp == JOptionPane.NO_OPTION) { // CANCEL EDITING |
200 | 198 |
cancelEdition(layer); |
201 |
layer.setEditing(false); |
|
199 |
// layer.setEditing(false);
|
|
202 | 200 |
return true; |
203 | 201 |
} else if (resp == JOptionPane.YES_OPTION) { |
204 | 202 |
int status = exportLayer(layer); |
205 | 203 |
if (status == JOptionPane.OK_OPTION) { |
206 | 204 |
cancelEdition(layer); |
207 |
layer.setEditing(false); |
|
205 |
// layer.setEditing(false);
|
|
208 | 206 |
} |
209 | 207 |
} |
210 | 208 |
|
211 |
} catch (StartEditionLayerException e) { |
|
212 |
NotificationManager.addError(e); |
|
213 | 209 |
} catch (ReadException e) { |
214 | 210 |
NotificationManager.addError(e); |
215 | 211 |
} catch (CancelEditingLayerException e) { |
... | ... | |
335 | 331 |
|
336 | 332 |
if (layer.isWritable()) { |
337 | 333 |
saveLayer(layer); |
338 |
layer.setEditing(false); |
|
334 |
// layer.setEditing(false);
|
|
339 | 335 |
// if (layer.isSpatiallyIndexed()) |
340 | 336 |
// { |
341 | 337 |
// if(layer.getISpatialIndex() != null) |
... | ... | |
363 | 359 |
if (resp == JOptionPane.YES_OPTION) { // CANCEL EDITING |
364 | 360 |
try { |
365 | 361 |
cancelEdition(layer); |
366 |
layer.setEditing(false); |
|
362 |
// layer.setEditing(false);
|
|
367 | 363 |
// if (!(layer.getSource().getDriver() instanceof |
368 | 364 |
// IndexedShpDriver)){ |
369 | 365 |
// VectorialLayerEdited |
... | ... | |
400 | 396 |
} |
401 | 397 |
} catch (ReadException e1) { |
402 | 398 |
NotificationManager.showMessageError(e1.getMessage(), e1); |
403 |
} catch (StartEditionLayerException e) { |
|
404 |
NotificationManager.showMessageError(e.getMessage(), e); |
|
405 | 399 |
} catch (DataException e) { |
406 | 400 |
NotificationManager.showMessageError(e.getMessage(), e); |
407 | 401 |
} |
Also available in: Unified diff