Revision 9377

View differences:

trunk/extensions/extCAD/src/com/iver/cit/gvsig/BreakExtension.java
89 89
				view = (View) PluginServices.getMDIManager().getActiveWindow();
90 90
				mapControl = view.getMapControl();
91 91
				EditionManager em=CADExtension.getEditionManager();
92
				if (em.getActiveLayerEdited()==null)
93
						return false;
92 94
				FLyrVect lv=(FLyrVect)em.getActiveLayerEdited().getLayer();
93 95

  
94
				if (em.getActiveLayerEdited()==null || lv.getRecordset().getSelection().cardinality()!=1)
96
				if (lv.getRecordset().getSelection().cardinality()!=1)
95 97
					return false;
96 98
				if (breakCADTool.isApplicable(lv.getShapeType())){
97 99
					return true;
trunk/extensions/extCAD/src/com/iver/cit/gvsig/EditionUtilities.java
61 61
        		
62 62
        	}        	
63 63
        	
64
        	if (numActiveVectorialEditable == 1)
64
        	if (numActiveVectorialEditable == 1 && numActiveVectorial == 1)
65 65
        		return EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE;
66
        	if (numActiveVectorialEditable > 1)
66
        	if (numActiveVectorialEditable > 1 && numActiveVectorial == numActiveVectorialEditable)
67 67
        		return EDITION_STATUS_MULTIPLE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE;
68 68
        	if (numActiveVectorial == 1)
69 69
        		return EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE;
trunk/extensions/extCAD/src/com/iver/cit/gvsig/EquidistanceExtension.java
89 89
				view = (View) PluginServices.getMDIManager().getActiveWindow();
90 90
				mapControl = view.getMapControl();
91 91
				EditionManager em=CADExtension.getEditionManager();
92
				if (em.getActiveLayerEdited()==null)
93
					return false;
92 94
				FLyrVect lv=(FLyrVect)em.getActiveLayerEdited().getLayer();
93

  
94
				if (em.getActiveLayerEdited()==null || lv.getRecordset().getSelection().cardinality()!=1)
95
				
96
				if (lv.getRecordset().getSelection().cardinality()!=1)
95 97
					return false;
96 98
				if (equidistanceCADTool.isApplicable(lv.getShapeType())){
97 99
					return true;
trunk/extensions/extCAD/src/com/iver/cit/gvsig/PreviousSelectionExtension.java
76 76
	 */
77 77
	public boolean isEnabled() {
78 78
		ILayerEdited layerEdited= CADExtension.getEditionManager().getActiveLayerEdited();
79
		if (layerEdited == null)
80
			return false;
79 81
		if (layerEdited instanceof VectorialLayerEdited) {
80 82
			return ((VectorialLayerEdited)layerEdited).getPreviousSelection();
81 83
		}
trunk/extensions/extCAD/src/com/iver/cit/gvsig/InternalPolygonExtension.java
91 91
			if (EditionUtilities.getEditionStatus() == EditionUtilities.EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE) {
92 92
				view = (View) PluginServices.getMDIManager().getActiveWindow();
93 93
				mapControl = view.getMapControl();
94
				if (CADExtension.getEditionManager().getActiveLayerEdited()==null)
95
					return false;
96 94
				EditionManager em=CADExtension.getEditionManager();
97 95
				if (em.getActiveLayerEdited()==null)
98 96
					return false;

Also available in: Unified diff