Revision 10626 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/CADToolAdapter.java
CADToolAdapter.java | ||
---|---|---|
14 | 14 |
import java.awt.geom.Point2D; |
15 | 15 |
import java.awt.geom.Rectangle2D; |
16 | 16 |
import java.awt.image.MemoryImageSource; |
17 |
import java.io.IOException; |
|
18 | 17 |
import java.util.ArrayList; |
19 | 18 |
import java.util.HashMap; |
20 | 19 |
import java.util.Stack; |
... | ... | |
22 | 21 |
|
23 | 22 |
import org.cresques.cts.IProjection; |
24 | 23 |
|
24 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
25 | 25 |
import com.iver.andami.PluginServices; |
26 | 26 |
import com.iver.andami.ui.mdiFrame.MainFrame; |
27 | 27 |
import com.iver.cit.gvsig.CADExtension; |
28 | 28 |
import com.iver.cit.gvsig.EditionManager; |
29 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
|
29 | 30 |
import com.iver.cit.gvsig.fmap.MapControl; |
30 | 31 |
import com.iver.cit.gvsig.fmap.ViewPort; |
31 | 32 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
32 | 33 |
import com.iver.cit.gvsig.fmap.core.v02.FConverter; |
33 | 34 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
34 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
35 | 35 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
36 | 36 |
import com.iver.cit.gvsig.fmap.edition.UtilFunctions; |
37 | 37 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
... | ... | |
843 | 843 |
VectorialEditableAdapter vea = vle.getVEA(); |
844 | 844 |
|
845 | 845 |
vea.startComplexRow(); |
846 |
FBitSet selection = vea.getSelection(); |
|
847 | 846 |
try { |
847 |
FBitSet selection = vea.getSelection(); |
|
848 | 848 |
int[] indexesToDel = new int[selection.cardinality()]; |
849 | 849 |
int j = 0; |
850 | 850 |
for (int i = selection.nextSetBit(0); i >= 0; i = selection |
... | ... | |
865 | 865 |
vea.removeRow(indexesToDel[i], PluginServices.getText(this, |
866 | 866 |
"deleted_feature"),EditionEvent.GRAPHIC); |
867 | 867 |
} |
868 |
} catch (DriverIOException e) { |
|
868 |
System.out.println("clear Selection"); |
|
869 |
selection.clear(); |
|
870 |
vle.clearSelection(VectorialLayerEdited.NOTSAVEPREVIOUS); |
|
871 |
} catch (ReadDriverException e) { |
|
872 |
// TODO Auto-generated catch block |
|
869 | 873 |
e.printStackTrace(); |
870 |
} catch (IOException e) { |
|
874 |
} catch (ExpansionFileReadException e) { |
|
875 |
// TODO Auto-generated catch block |
|
871 | 876 |
e.printStackTrace(); |
872 | 877 |
} finally { |
873 |
try { |
|
874 |
String description=PluginServices.getText(this,"remove_geometry"); |
|
875 |
vea.endComplexRow(description); |
|
876 |
} catch (IOException e1) { |
|
877 |
e1.printStackTrace(); |
|
878 |
} catch (DriverIOException e1) { |
|
879 |
e1.printStackTrace(); |
|
880 |
} |
|
878 |
String description=PluginServices.getText(this,"remove_geometry"); |
|
879 |
vea.endComplexRow(description); |
|
881 | 880 |
} |
882 |
System.out.println("clear Selection"); |
|
883 |
selection.clear(); |
|
884 |
vle.clearSelection(VectorialLayerEdited.NOTSAVEPREVIOUS); |
|
881 |
|
|
882 |
|
|
885 | 883 |
/* |
886 | 884 |
* if (getCadTool() instanceof SelectionCADTool) { SelectionCADTool |
887 | 885 |
* selTool = (SelectionCADTool) getCadTool(); selTool.clearSelection(); } |
... | ... | |
918 | 916 |
selCad.init(); |
919 | 917 |
VectorialLayerEdited vle = (VectorialLayerEdited) CADExtension |
920 | 918 |
.getEditionManager().getActiveLayerEdited(); |
921 |
vle.clearSelection(VectorialLayerEdited.NOTSAVEPREVIOUS); |
|
919 |
try { |
|
920 |
vle.clearSelection(VectorialLayerEdited.NOTSAVEPREVIOUS); |
|
921 |
} catch (ReadDriverException e) { |
|
922 |
// TODO Auto-generated catch block |
|
923 |
e.printStackTrace(); |
|
924 |
} |
|
922 | 925 |
|
923 | 926 |
pushCadTool(selCad); |
924 | 927 |
// getVectorialAdapter().getSelection().clear(); |
Also available in: Unified diff