Revision 5878 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/RotateCADTool.java
RotateCADTool.java | ||
---|---|---|
56 | 56 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
57 | 57 |
import com.iver.cit.gvsig.fmap.edition.DefaultRowEdited; |
58 | 58 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
59 |
import com.iver.cit.gvsig.fmap.edition.IRowEdited; |
|
59 | 60 |
import com.iver.cit.gvsig.fmap.edition.UtilFunctions; |
60 | 61 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
61 | 62 |
import com.iver.cit.gvsig.gui.cad.DefaultCADTool; |
... | ... | |
135 | 136 |
RotateCADToolState actualState = (RotateCADToolState) _fsm.getPreviousState(); |
136 | 137 |
String status = actualState.getName(); |
137 | 138 |
ArrayList selectedRow=getSelectedRows(); |
139 |
ArrayList selectedRowAux=new ArrayList(); |
|
138 | 140 |
VectorialLayerEdited vle=getVLE(); |
139 | 141 |
VectorialEditableAdapter vea = vle.getVEA(); |
140 | 142 |
if (status.equals("Rotate.PointMain")) { |
... | ... | |
150 | 152 |
|
151 | 153 |
try { |
152 | 154 |
vea.startComplexRow(); |
153 |
///ArrayList selectedRowAux=new ArrayList(); |
|
154 |
for (int i = 0; i < selectedRow.size(); i++) { |
|
155 |
for (int i = 0; i < selectedRow.size(); i++) { |
|
155 | 156 |
DefaultRowEdited row=(DefaultRowEdited) selectedRow.get(i); |
156 | 157 |
DefaultFeature fea = (DefaultFeature) row.getLinkedRow().cloneRow(); |
157 | 158 |
// Rotamos la geometry |
... | ... | |
160 | 161 |
+ (Math.PI / 2), firstPoint.getX(), firstPoint |
161 | 162 |
.getY()); |
162 | 163 |
|
163 |
vea.modifyRow(row.getIndex(), fea, |
|
164 |
int index=vea.modifyRow(row.getIndex(), fea,
|
|
164 | 165 |
getName(),EditionEvent.GRAPHIC); |
165 |
///selectedRowAux.add(new DefaultRowEdited(fea,IRowEdited.STATUS_MODIFIED,index));
|
|
166 |
selectedRowAux.add(new DefaultRowEdited(fea,IRowEdited.STATUS_MODIFIED,index)); |
|
166 | 167 |
} |
167 | 168 |
|
168 | 169 |
vea.endComplexRow(); |
169 | 170 |
clearSelection(); |
170 |
///selectedRow=selectedRowAux;
|
|
171 |
selectedRow.addAll(selectedRowAux);
|
|
171 | 172 |
} catch (DriverIOException e) { |
172 | 173 |
e.printStackTrace(); |
173 | 174 |
} catch (IOException e1) { |
Also available in: Unified diff