Revision 22465 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
FLyrVect.java | ||
---|---|---|
57 | 57 |
import org.cresques.cts.ICoordTrans; |
58 | 58 |
|
59 | 59 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
60 |
import com.hardcode.gdbms.engine.data.DataSourceFactory; |
|
60 | 61 |
import com.hardcode.gdbms.engine.data.NoSuchTableException; |
61 | 62 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
62 | 63 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
... | ... | |
406 | 407 |
ReadableVectorial rv=getSource(); |
407 | 408 |
int selectionIndex=-1; |
408 | 409 |
if (rv instanceof ISpatialDB){ |
409 |
selectionIndex=((ISpatialDB)rv).getRowIndexByFID(feat);
|
|
410 |
selectionIndex = ((ISpatialDB)rv).getRowIndexByFID(feat);
|
|
410 | 411 |
}else{ |
411 |
selectionIndex=Integer.parseInt(feat.getID());
|
|
412 |
selectionIndex = Integer.parseInt(feat.getID());
|
|
412 | 413 |
} |
413 | 414 |
if (selectionIndex!=-1) { |
414 | 415 |
if (selectionSupport.isSelected(selectionIndex)) { |
... | ... | |
1190 | 1191 |
try { |
1191 | 1192 |
getRecordset().getSelectionSupport().setXMLEntity(xml.getChild(1)); |
1192 | 1193 |
// JMVIVO: Esto sirve para algo???? |
1194 |
/* |
|
1195 |
* Jaume: si, para restaurar el selectable datasource cuando se |
|
1196 |
* clona la capa, cuando se carga de un proyecto. Si no esta ya |
|
1197 |
* no se puede ni hacer consultas sql, ni hacer selecciones, |
|
1198 |
* ni usar la mayor parte de las herramientas. |
|
1199 |
* |
|
1200 |
* Lo vuelvo a poner. |
|
1201 |
*/ |
|
1202 |
|
|
1193 | 1203 |
String recordsetName = xml.getStringProperty("recordset-name"); |
1194 | 1204 |
|
1205 |
SelectableDataSource sds = new SelectableDataSource(LayerFactory |
|
1206 |
.getDataSourceFactory().createRandomDataSource( |
|
1207 |
recordsetName, DataSourceFactory.AUTOMATIC_OPENING)); |
|
1208 |
|
|
1195 | 1209 |
LayerFactory.getDataSourceFactory().changeDataSourceName( |
1196 | 1210 |
getSource().getRecordset().getName(), recordsetName); |
1197 | 1211 |
} catch (NoSuchTableException e1) { |
Also available in: Unified diff