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

View differences:

ZoomToSelectExtension.java
51 51
import org.gvsig.fmap.mapcontext.MapContext;
52 52
import org.gvsig.fmap.mapcontext.layers.FLayer;
53 53
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
54
import org.gvsig.project.document.table.gui.FeatureTableDocumentPanel;
54 55
import org.gvsig.tools.exception.BaseException;
55 56

  
56 57
import com.iver.andami.PluginServices;
57 58
import com.iver.andami.messages.NotificationManager;
58 59
import com.iver.andami.plugins.Extension;
59 60
import com.iver.andami.ui.mdiManager.IWindow;
60
import com.iver.cit.gvsig.project.documents.table.gui.Table;
61 61
import com.iver.cit.gvsig.project.documents.view.gui.View;
62 62

  
63 63

  
......
78 78
		if (f instanceof View) {
79 79
			View vista = (View)f;
80 80
			mapa = vista.getModel().getMapContext();
81
		}else if (f instanceof Table) {
82
			Table table=(Table)f;
83
			mapa = (table.getModel().getAssociatedTable()).getMapContext();
81
		}else if (f instanceof FeatureTableDocumentPanel) {
82
			FeatureTableDocumentPanel table=(FeatureTableDocumentPanel)f;
83
			mapa = (table.getModel().getAssociatedLayer()).getMapContext();
84 84
		}
85 85

  
86 86
		try {
......
149 149
					return false;
150 150
				}
151 151
			}
152
		}else if (f instanceof Table) {
153
			Table t=(Table)f;
152
		}else if (f instanceof FeatureTableDocumentPanel) {
153
			FeatureTableDocumentPanel t=(FeatureTableDocumentPanel)f;
154 154
			IWindow[] windows=PluginServices.getMDIManager().getAllWindows();
155 155
			for (int i=0;i<windows.length;i++) {
156 156
				if (windows[i] instanceof View) {
157
					if (((View)windows[i]).getMapControl().getMapContext().equals((t.getModel().getAssociatedTable()).getMapContext())){
157
					if (((View)windows[i]).getMapControl().getMapContext().equals((t.getModel().getAssociatedLayer()).getMapContext())){
158 158
						try {
159
							if (!t.getModel().getModel().getFeatureSelection()
159
							if (!t.getModel().getStore().getFeatureSelection()
160 160
									.isEmpty()) {
161 161
								return true;
162 162
							}

Also available in: Unified diff