Revision 9532 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ClearSelectionExtension.java
ClearSelectionExtension.java | ||
---|---|---|
56 | 56 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
57 | 57 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
58 | 58 |
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource; |
59 |
import com.iver.cit.gvsig.project.documents.ProjectDocument; |
|
59 | 60 |
import com.iver.cit.gvsig.project.documents.table.ProjectTable; |
60 | 61 |
import com.iver.cit.gvsig.project.documents.table.gui.Table; |
61 | 62 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
... | ... | |
87 | 88 |
if (refresh) { |
88 | 89 |
mapCtrl.drawMap(false); |
89 | 90 |
} |
91 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
90 | 92 |
}else if (view instanceof Table){ |
91 | 93 |
Table table = (Table) view; |
92 | 94 |
ProjectTable model = table.getModel(); |
... | ... | |
99 | 101 |
if (refresh) { |
100 | 102 |
table.refresh(); |
101 | 103 |
} |
104 |
table.getModel().setModified(true); |
|
102 | 105 |
} |
103 | 106 |
} |
104 | 107 |
} |
... | ... | |
106 | 109 |
|
107 | 110 |
private boolean clearSelectionOfView(FLayers layers){ |
108 | 111 |
boolean refresh=false; |
109 |
|
|
112 |
|
|
110 | 113 |
for (int i = 0; i < layers.getLayersCount(); i++) { |
111 | 114 |
FLayer lyr =layers.getLayer(i); |
112 | 115 |
if (lyr instanceof FLayers){ |
113 | 116 |
refresh = refresh || clearSelectionOfView((FLayers) lyr); |
114 | 117 |
} else if (lyr instanceof FLyrVect) { |
115 |
FLyrVect lyrVect = (FLyrVect) lyr;
|
|
118 |
FLyrVect lyrVect = (FLyrVect) lyr; |
|
116 | 119 |
if (lyrVect.isActive()) { |
117 | 120 |
try { |
118 | 121 |
SelectableDataSource dataSource; |
... | ... | |
176 | 179 |
return true; |
177 | 180 |
} |
178 | 181 |
} else if (lyr instanceof FLyrVect) { |
179 |
FLyrVect lyrVect = (FLyrVect) lyr;
|
|
182 |
FLyrVect lyrVect = (FLyrVect) lyr; |
|
180 | 183 |
if (lyrVect.isActive()) { |
181 | 184 |
if (lyrVect.isAvailable()){ |
182 | 185 |
try { |
Also available in: Unified diff