Revision 42086
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/selectionByTheme/MySelectionByThemeListener.java | ||
---|---|---|
131 | 131 |
filter.setData(storeToQuery.getDefaultFeatureType(),storeToQuery.getDefaultFeatureType().getDefaultGeometryAttributeName(),null); |
132 | 132 |
|
133 | 133 |
fQuery.setFilter(filter); |
134 |
FeatureSet featureSet = null; |
|
134 |
FeatureSet newFeatureSet = null; |
|
135 |
FeatureSelection previousFeatureSet = null; |
|
135 | 136 |
try { |
136 |
featureSet = storeToQuery.getFeatureSet(fQuery); |
|
137 |
storeToQuery.setSelection(featureSet); |
|
137 |
newFeatureSet = storeToQuery.getFeatureSet(fQuery); |
|
138 |
previousFeatureSet= storeToQuery.getFeatureSelection(); |
|
139 |
previousFeatureSet.select(newFeatureSet); |
|
140 |
storeToQuery.setSelection(previousFeatureSet); |
|
138 | 141 |
} finally { |
139 |
if (featureSet != null) {
|
|
140 |
featureSet.dispose();
|
|
142 |
if (newFeatureSet != null) {
|
|
143 |
newFeatureSet.dispose();
|
|
141 | 144 |
} |
145 |
if (previousFeatureSet != null) { |
|
146 |
previousFeatureSet.dispose(); |
|
147 |
} |
|
142 | 148 |
} |
143 | 149 |
} |
144 | 150 |
} |
Also available in: Unified diff