Revision 10873
branches/v10/extensions/extCAD/src/com/iver/cit/gvsig/EditionUtilities.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig; |
2 | 2 |
|
3 |
import java.sql.Connection; |
|
3 | 4 |
import java.util.ArrayList; |
4 | 5 |
|
5 | 6 |
import com.iver.andami.PluginServices; |
... | ... | |
46 | 47 |
|
47 | 48 |
int numActiveVectorial = 0; |
48 | 49 |
int numActiveVectorialEditable = 0; |
49 |
|
|
50 |
|
|
50 | 51 |
LayersIterator iter = new LayersIterator(capas); |
51 |
|
|
52 |
|
|
52 | 53 |
FLayer capa; |
53 | 54 |
while (iter.hasNext()) { |
54 | 55 |
capa = iter.nextLayer(); |
... | ... | |
58 | 59 |
if (capa.isEditing()) |
59 | 60 |
numActiveVectorialEditable++; |
60 | 61 |
} |
61 |
|
|
62 |
}
|
|
63 |
|
|
62 |
|
|
63 |
} |
|
64 |
|
|
64 | 65 |
if (numActiveVectorialEditable == 1 && numActiveVectorial == 1) |
65 | 66 |
return EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE; |
66 | 67 |
if (numActiveVectorialEditable > 1 && numActiveVectorial == numActiveVectorialEditable) |
... | ... | |
94 | 95 |
|
95 | 96 |
int numActiveVectorial = 0; |
96 | 97 |
int numActiveVectorialEditable = 0; |
97 |
|
|
98 |
|
|
98 | 99 |
LayersIterator iter = new LayersIterator(capas); |
99 | 100 |
FLayer capa; |
100 | 101 |
while (iter.hasNext()) { |
... | ... | |
112 | 113 |
} |
113 | 114 |
if (resul.isEmpty()) |
114 | 115 |
return null; |
115 |
|
|
116 |
|
|
116 | 117 |
return (FLayer[]) resul.toArray(new FLayer[0]); |
117 | 118 |
|
118 | 119 |
} |
... | ... | |
125 | 126 |
if (layer.getSource().getDriver() instanceof VectorialDatabaseDriver) |
126 | 127 |
{ |
127 | 128 |
VectorialDatabaseDriver dbDriver = (VectorialDatabaseDriver) layer.getSource().getDriver(); |
129 |
dbDriver.getLyrDef().setConnection((Connection)dbDriver.getConnection()); |
|
128 | 130 |
return dbDriver.getLyrDef(); |
129 | 131 |
} |
130 | 132 |
else |
Also available in: Unified diff