Slider::sliderDragEnded called on mouse down

Hi all,

Unsure if I’m missing something about Slider behaviour or if I’ve found a bug.

I’m trying to carry out an action only on slider drag end, however after overriding sliderDragEnded, I’m finding that it gets called on mouseDown.

It seems that Slider::Pimple:mouseDown() calls currentDrag.reset(), which triggers the destructor of DragInProgress, and thus calling sendDragEnd()

Is this intentional?

Many thanks!

Are you using a customised slider or changing any of the default behaviours? The currentDrag.reset() call in mouseDown() shouldn’t be deleting a DragInProgress object as it will have been deleted on mouseUp() as far as I can tell.

Hi Ed,

You were right, I am using a customised slider which was not written by myself, but there was a missing call to Slider::mouseUp();

Given that Slider::mouseDown(); was being called, the drag logic in Slider must have been out of sync.

Apologies, it was a misleading call stack!