Revision 21739

View differences:

trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/roi/ui/ROIManagerDialog.java
85 85
		this.setSize(width, height);
86 86
		this.setLayout(new BorderLayout());
87 87
		this.add(getROIsManagerPanel(), BorderLayout.CENTER);
88
		View view = (View) PluginServices.getMDIManager().getActiveWindow();
88
		IWindow[] list = PluginServices.getMDIManager().getAllWindows();
89
		View view = null;
90
		for (int i = 0; i < list.length; i++) {
91
			if(list[i] instanceof View)
92
				view = (View)list[i];
93
		}
94
		if (view == null)
95
			return;
89 96
		mapControl = view.getMapControl();
90 97
		previousTool = mapControl.getCurrentTool();
91 98
		
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/roi/ui/ROIsTablePanel.java
78 78
import org.gvsig.rastertools.roi.ui.listener.ROIsTablePanelListener;
79 79

  
80 80
import com.iver.andami.PluginServices;
81
import com.iver.andami.ui.mdiManager.IWindow;
81 82
import com.iver.cit.gvsig.fmap.MapControl;
82 83
import com.iver.cit.gvsig.fmap.ViewPort;
83 84
import com.iver.cit.gvsig.fmap.core.FShape;
......
248 249
		}
249 250
		
250 251
		if (view==null){
251
			view = (View) PluginServices.getMDIManager().getActiveWindow();
252
			IWindow[] list = PluginServices.getMDIManager().getAllWindows();
253
			for (int i = 0; i < list.length; i++) {
254
				if(list[i] instanceof View)
255
					view = (View)list[i];
256
			}
257
			if (view == null)
258
				return;
252 259
			mapControl = view.getMapControl();
253 260
	
254 261
			/*

Also available in: Unified diff