Skip to content

Commit ca62908

Browse files
committed
Filter Slider no longer shows minor ticks when there’s enough major ones.
1 parent e3f5585 commit ca62908

File tree

1 file changed

+6
-4
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util

1 file changed

+6
-4
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util/SliderBarPanel.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@ JSlider getSlider() {
235235
int n = result.isPresent() ? result.get() : 10;
236236
slider.setMajorTickSpacing(S_RANGE / n);
237237

238-
if (S_RANGE / (n * n) > 0)
239-
slider.setMinorTickSpacing(S_RANGE / (n * n));
240-
else
241-
slider.setMinorTickSpacing(S_RANGE / (n * 2));
238+
if (n <= 5) {
239+
if (S_RANGE / (n * n) > 0)
240+
slider.setMinorTickSpacing(S_RANGE / (n * n));
241+
else
242+
slider.setMinorTickSpacing(S_RANGE / (n * 2));
243+
}
242244

243245
labelTable.put(S_MIN, new JLabel(format.format(min)));
244246

0 commit comments

Comments
 (0)