Skip to content

Commit 945da14

Browse files
committed
Make sure HeatMap repaints properly when switching networks.
1 parent 1def62d commit 945da14

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/heatmap/HeatMapMediator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ public class HeatMapMediator implements RowsSetListener, SetCurrentNetworkViewLi
112112

113113
@Inject private HeatMapPanel heatMapPanel;
114114
@Inject private Provider<HeatMapContentPanel> contentPanelProvider;
115-
@Inject private HeatMapContentPanel contentPanel2;
116115

116+
private HeatMapContentPanel contentPanel2;
117117
private final CoalesceTimer selectionEventTimer = new CoalesceTimer(200, 1);
118118
private boolean onlyEdges;
119119

@@ -153,7 +153,6 @@ private HeatMapContentPanel getContentPanel() {
153153
// Property Change Listeners
154154
contentPanel2.addPropertyChangeListener("selectedRankingOption", evt -> settingChanged());
155155
}
156-
heatMapPanel.showContentPanel(contentPanel2);
157156
return contentPanel2;
158157
}
159158

@@ -295,6 +294,8 @@ private void updateHeatMap(CyNetworkView networkView) {
295294

296295
invokeOnEDT(() -> {
297296
HeatMapContentPanel contentPanel = getContentPanel();
297+
heatMapPanel.showContentPanel(contentPanel2);
298+
298299
resetWithoutListeners(() -> {
299300
contentPanel.update(network, map, params, rankOptions, union, inter, clusterRankingOption);
300301
});

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/heatmap/HeatMapPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public void showContentPanel(HeatMapContentPanel contentPanel) {
4949
add(contentPanel, BorderLayout.CENTER);
5050
else
5151
add(nullContentPanel, BorderLayout.CENTER);
52+
repaint();
5253
}
5354

5455

0 commit comments

Comments
 (0)