From 95e3ff33496cabfa61a863a09f98ef10e65eabae Mon Sep 17 00:00:00 2001 From: daboe01 Date: Tue, 16 Jul 2024 19:12:04 +0200 Subject: [PATCH] wrap fix in if (_allowsTickMarkValuesOnly) --- AppKit/CPSlider.j | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AppKit/CPSlider.j b/AppKit/CPSlider.j index b89daa56d..04c7f5ce8 100644 --- a/AppKit/CPSlider.j +++ b/AppKit/CPSlider.j @@ -312,8 +312,11 @@ var AFFINITY = 5; if (!trackRect || CGRectIsEmpty(trackRect)) trackRect = bounds; - [self closestTickMarkValueToValue:[self doubleValue]]; // we only need the side effect … - _currentTickMarkSegment = _closestTickMarkIndex; // … when "Only stop on tick marks" selected + if (_allowsTickMarkValuesOnly) + { + [self closestTickMarkValueToValue:[self doubleValue]]; // we only need the side effect … + _currentTickMarkSegment = _closestTickMarkIndex; + } if (_isCircular) {