Revision 29775 trunk/extensions/extCAD/src/com/iver/cit/gvsig/StartEditing.java
StartEditing.java | ||
---|---|---|
70 | 70 |
|
71 | 71 |
boolean bEditingStarted = false; |
72 | 72 |
if (actives.length == 1 && actives[0] instanceof FLyrVect) { |
73 |
if (!mapControl.getProjection().getAbrev().equals(actives[0].getProjection().getAbrev())){ |
|
73 |
FLyrVect lv = (FLyrVect) actives[0]; |
|
74 |
if (!mapControl.getProjection().getAbrev().equals(lv.getProjection().getAbrev())){ |
|
74 | 75 |
NotificationManager.showMessageInfo(PluginServices.getText(this,"no_es_posible_editar_capa_reproyectada"),null); |
75 | 76 |
return; |
76 | 77 |
} |
78 |
if (lv.isJoined()) { |
|
79 |
int resp = JOptionPane.showConfirmDialog((Component) PluginServices |
|
80 |
.getMainFrame(), PluginServices.getText(this,"se_perdera_la_union")+ |
|
81 |
"\n" + PluginServices.getText(this,"desea_continuar"), |
|
82 |
PluginServices.getText(this,"start_edition"), |
|
83 |
JOptionPane.YES_NO_OPTION); |
|
84 |
if (resp != JOptionPane.YES_OPTION) { // CANCEL EDITING |
|
85 |
return; // Salimos sin iniciar edici?n |
|
86 |
} |
|
87 |
} |
|
77 | 88 |
CADExtension.initFocus(); |
78 | 89 |
vista.showConsole(); |
79 | 90 |
EditionManager editionManager=CADExtension.getEditionManager(); |
... | ... | |
84 | 95 |
* layers.getLayer(j).setVisible(false); } |
85 | 96 |
*/ |
86 | 97 |
|
87 |
FLyrVect lv = (FLyrVect) actives[0]; |
|
98 |
|
|
88 | 99 |
// lv.setVisible(true); |
89 | 100 |
lv.addLayerListener(editionManager); |
90 | 101 |
try { |
... | ... | |
98 | 109 |
PluginServices.getText(this, "warning_title"), |
99 | 110 |
JOptionPane.WARNING_MESSAGE); |
100 | 111 |
} |
101 |
|
|
102 |
if (lv.isJoined()) { |
|
103 |
int resp = JOptionPane.showConfirmDialog((Component) PluginServices |
|
104 |
.getMainFrame(), PluginServices.getText(this,"se_perdera_la_uni?n")+ |
|
105 |
"\n" + PluginServices.getText(this,"desea_continuar"), |
|
106 |
PluginServices.getText(this,"start_edition"), |
|
107 |
JOptionPane.YES_NO_OPTION); |
|
108 |
if (resp != JOptionPane.YES_OPTION) { // CANCEL EDITING |
|
109 |
return; // Salimos sin iniciar edici?n |
|
110 |
} |
|
111 |
} |
|
112 | 112 |
lv.setEditing(true); |
113 | 113 |
VectorialEditableAdapter vea = (VectorialEditableAdapter) lv |
114 | 114 |
.getSource(); |
Also available in: Unified diff