Revision 21367 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/ZoomToSelectExtension.java

View differences:

ZoomToSelectExtension.java
48 48

  
49 49
import java.awt.geom.Rectangle2D;
50 50

  
51
import org.gvsig.data.ReadException;
51 52
import org.gvsig.fmap.mapcontext.MapContext;
52 53
import org.gvsig.fmap.mapcontext.layers.FLayer;
53 54
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
54 55

  
55
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
56 56
import com.iver.andami.PluginServices;
57 57
import com.iver.andami.plugins.Extension;
58 58
import com.iver.andami.ui.mdiManager.IWindow;
......
138 138
			FLayer[] selected = view.getModel().getMapContext().getLayers().getActives();
139 139
			if (selected.length == 1 && selected[0] instanceof FLyrVect && selected[0].isAvailable()){
140 140
				try {
141
					if (!((FLyrVect)selected[0]).getRecordset().getSelection().isEmpty())
141
					if (!((FLyrVect)selected[0]).getFeatureStore().getSelection().isEmpty())
142 142
						return true;
143
				} catch (ReadDriverException e) {
143
				} catch (ReadException e) {
144 144
					return false;
145 145
				}
146 146
			}
......
150 150
			for (int i=0;i<windows.length;i++) {
151 151
				if (windows[i] instanceof View) {
152 152
					if (((View)windows[i]).getMapControl().getMapContext().equals(((FLyrVect)t.getModel().getAssociatedTable()).getMapContext())){
153
						try {
154
							if (!t.getModel().getModelo().getSelection().isEmpty()) {
155
								return true;
156
							}
157
						} catch (ReadDriverException e) {
158
							return false;
153
						if (!t.getModel().getModelo().getSelection().isEmpty()) {
154
							return true;
159 155
						}
160 156
					}
161 157
				}

Also available in: Unified diff