File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/heatmap Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -256,10 +256,21 @@ private Collection<EMDataSet> getEnabledDataSets(
256
256
257
257
// Remove Data Sets that are not part of the selected nodes/edges
258
258
if (propertyManager .isTrue (PropertyManager .HEATMAP_SELECT_SYNC )) {
259
+ boolean distinctEdges = map .getParams ().getCreateDistinctEdges ();
260
+
259
261
Iterator <EMDataSet > iter = dataSets .iterator ();
260
262
while (iter .hasNext ()) {
261
263
EMDataSet ds = iter .next ();
262
- if (!ds .containsAnyNode (selectedNodes ) && !ds .containsAnyEdge (selectedEdges )) {
264
+
265
+ boolean remove = true ;
266
+ if (ds .containsAnyNode (selectedNodes ))
267
+ remove = false ;
268
+ else if (!distinctEdges && !selectedEdges .isEmpty ())
269
+ remove = false ;
270
+ else if (distinctEdges && ds .containsAnyEdge (selectedEdges ))
271
+ remove = false ;
272
+
273
+ if (remove ) {
263
274
iter .remove ();
264
275
}
265
276
}
You can’t perform that action at this time.
0 commit comments