Revision 27270 branches/v2_0_0_prep/extensions/extEditing/src/com/iver/cit/gvsig/layers/VectorialLayerEdited.java
VectorialLayerEdited.java | ||
---|---|---|
206 | 206 |
private void selectAndDrawGeometries(FeatureStore featureStore, FeatureSet set, ViewPort vp, boolean multipleSelection) throws DataException, GeometryOperationNotSupportedException, GeometryOperationException{ |
207 | 207 |
BufferedImage selectionImage = null; |
208 | 208 |
BufferedImage handlersImage = null; |
209 |
if (!multipleSelection) { |
|
210 |
clearSelection(); |
|
211 |
} |
|
209 |
// if (!multipleSelection) {
|
|
210 |
// clearSelection();
|
|
211 |
// }
|
|
212 | 212 |
if (multipleSelection && getSelectionImage()!=null && getHandlersImage()!=null) { |
213 | 213 |
selectionImage=(BufferedImage)getSelectionImage(); |
214 | 214 |
handlersImage = (BufferedImage)getHandlersImage(); |
... | ... | |
218 | 218 |
} |
219 | 219 |
Graphics2D gs = selectionImage.createGraphics(); |
220 | 220 |
Graphics2D gh = handlersImage.createGraphics(); |
221 |
FeatureSelection featureSelection = (FeatureSelection)featureStore.getSelection(); |
|
222 |
featureSelection.select(set); |
|
221 |
FeatureSelection featureSelection = null; |
|
222 |
if (multipleSelection){ |
|
223 |
featureSelection=(FeatureSelection)featureStore.getSelection(); |
|
224 |
featureSelection.select(set); |
|
225 |
}else{ |
|
226 |
featureSelection=featureStore.createFeatureSelection(); |
|
227 |
featureSelection.select(set); |
|
228 |
featureStore.setSelection(featureSelection); |
|
229 |
} |
|
230 |
|
|
223 | 231 |
Iterator<Feature> iterator = set.iterator(); |
224 | 232 |
|
225 | 233 |
DrawOperationContext doc = new DrawOperationContext(); |
Also available in: Unified diff