File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -457,8 +457,11 @@ - (void)touchUp:(NSSet *)touches {
457457
458458- (void )moveThumbToTick : (unsigned int )tick {
459459 const unsigned int nonZeroIncrement = ((0 == self.incrementValue ) ? 1 : self.incrementValue );
460- _intValue = self.minimumValue + (tick * nonZeroIncrement);
461- [self sendActionsForControlEvents ];
460+ int intValue = self.minimumValue + (tick * nonZeroIncrement);
461+ if ( intValue != _intValue) {
462+ _intValue = intValue;
463+ [self sendActionsForControlEvents ];
464+ }
462465
463466 [self layoutThumb ];
464467 [self setNeedsDisplay ];
@@ -473,8 +476,11 @@ - (void)moveThumbTo:(CGFloat)abscisse duration:(CFTimeInterval)duration {
473476
474477 const unsigned int tick = [self pickTickFromSliderPosition: self .thumbAbscisse];
475478 const unsigned int nonZeroIncrement = ((0 == self.incrementValue ) ? 1 : self.incrementValue );
476- _intValue = self.minimumValue + (tick * nonZeroIncrement);
477- [self sendActionsForControlEvents ];
479+ int intValue = self.minimumValue + (tick * nonZeroIncrement);
480+ if ( intValue != _intValue) {
481+ _intValue = intValue;
482+ [self sendActionsForControlEvents ];
483+ }
478484
479485 [self setNeedsDisplay ];
480486}
You can’t perform that action at this time.
0 commit comments