@@ -229,10 +229,8 @@ private void updateHeatMap(CyNetworkView networkView) {
229
229
230
230
CyNetwork network = networkView .getModel ();
231
231
EnrichmentMap map = emManager .getEnrichmentMap (network .getSUID ());
232
-
233
- if (map == null ) {
232
+ if (map == null )
234
233
return ;
235
- }
236
234
237
235
List <CyNode > selectedNodes = CyTableUtil .getNodesInState (network , CyNetwork .SELECTED , true );
238
236
List <CyEdge > selectedEdges = CyTableUtil .getEdgesInState (network , CyNetwork .SELECTED , true );
@@ -243,25 +241,26 @@ private void updateHeatMap(CyNetworkView networkView) {
243
241
final Set <String > union ;
244
242
final Set <String > inter ;
245
243
246
- AssociatedApp app = NetworkUtil .getAssociatedApp (network );
247
-
248
244
if (emManager .isEnrichmentMap (networkView )) {
249
245
union = unionGenesets (network , selectedNodes , selectedEdges , prefix );
250
246
inter = intersectionGenesets (network , selectedNodes , selectedEdges , prefix );
251
- } else if (app != null ) {
252
- union = new HashSet <>();
253
-
254
- for (CyNode node : selectedNodes ) {
255
- CyRow row = network .getRow (node );
256
- String geneName = app .getGeneNameColumn ().get (row , null , null );
247
+ } else {
248
+ AssociatedApp app = NetworkUtil .getAssociatedApp (network );
249
+ if (app != null ) {
250
+ union = new HashSet <>();
257
251
258
- if (geneName != null )
259
- union .add (geneName );
252
+ for (CyNode node : selectedNodes ) {
253
+ CyRow row = network .getRow (node );
254
+ String geneName = app .getGeneNameColumn ().get (row , null , null );
255
+
256
+ if (geneName != null )
257
+ union .add (geneName );
258
+ }
259
+
260
+ inter = union ;
261
+ } else {
262
+ inter = union = Collections .emptySet ();
260
263
}
261
-
262
- inter = union ;
263
- } else {
264
- inter = union = Collections .emptySet ();
265
264
}
266
265
267
266
List <RankingOption > rankOptions = getDataSetRankOptions (map , network , selectedNodes , selectedEdges );
@@ -270,11 +269,11 @@ private void updateHeatMap(CyNetworkView networkView) {
270
269
271
270
invokeOnEDT (() -> {
272
271
HeatMapContentPanel contentPanel = getContentPanel ();
273
- heatMapPanel .showContentPanel (contentPanel2 );
272
+ heatMapPanel .showContentPanel (contentPanel );
274
273
275
- resetWithoutListeners (() -> {
276
- contentPanel .update (network , map , params , rankOptions , union , inter , clusterRankingOption );
277
- } );
274
+ resetWithoutListeners (() ->
275
+ contentPanel .update (network , map , params , rankOptions , union , inter , clusterRankingOption )
276
+ );
278
277
279
278
if (propertyManager .getValue (PropertyManager .HEATMAP_AUTOFOCUS ))
280
279
bringToFront ();
0 commit comments