Skip to content

Commit b1c4634

Browse files
committed
Removes calls to visualStyle.apply() and view.updateView(), because they are redundant and could make style updates slower. Also don’t set the EM style to the view again (when it’s already set to that view).
1 parent 9177b23 commit b1c4634

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/task/ApplyEMStyleTask.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,10 @@ public void run(TaskMonitor taskMonitor) throws Exception {
4747
private void applyVisualStyle() {
4848
CyNetworkView view = options.getNetworkView();
4949
VisualStyle vs = getVisualStyle(options.getEnrichmentMap());
50+
styleBuilderProvider.get().updateProperties(vs, options, chart);
5051

51-
EMStyleBuilder styleBuilder = styleBuilderProvider.get();
52-
styleBuilder.updateProperties(vs, options, chart);
53-
54-
visualMappingManager.setVisualStyle(vs, view);
55-
vs.apply(view);
56-
view.updateView();
52+
if (!vs.equals(visualMappingManager.getVisualStyle(view)))
53+
visualMappingManager.setVisualStyle(vs, view);
5754
}
5855

5956
private VisualStyle getVisualStyle(EnrichmentMap map) {

0 commit comments

Comments
 (0)