Revision 46277 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/AbstractVectorialLegend.java
AbstractVectorialLegend.java | ||
---|---|---|
443 | 443 |
FeatureSet featureSet = null; |
444 | 444 |
try { |
445 | 445 |
taskStatus.message("Retrieve selection"); |
446 |
FeatureSelection selection = featureStore.getFeatureSelection(); |
|
446 |
FeatureSelection selection; |
|
447 |
if( featureStore.isFeatureSelectionEmpty() ) { |
|
448 |
// No hay seleccion, asi que creamos una vacia que consuma pocos recursos. |
|
449 |
selection = featureStore.createMemoryFeatureSelection(); |
|
450 |
} else { |
|
451 |
// Ojo, que esta seleccion puede acabar haciendo un count(*) sobre la tabla. |
|
452 |
selection = featureStore.getFeatureSelection(); |
|
453 |
} |
|
447 | 454 |
|
448 | 455 |
if (featureQuery == null) { |
449 | 456 |
featureQuery = featureStore.createFeatureQuery(); |
Also available in: Unified diff