Dragging a component in Ableton Live 7.0.1 (Windows)


#1

I got a weird problem with a draggable control in a plugin: it’s a small circle which can be moved around with the mouse while the left mouse button is clicked. Now this works flawlessly in all hosts I’ve tested, except in Ableton Live. There, I grab the circle, I start the dragging, but when I stop most of the times the circles simply keeps on moving (i.e. it doesn’t seem to get the end-of-drag-signal). Has anybody else experienced this, and what might be the direction to look for a solution?

Thanks, siedschl


#2

To add to the confusion: the problem disappears when the plugin is compiled in debug mode…


#3

And it works on the Mac, both VST and AU versions… (also Live 7.0.1). Hmmm…


#4

Now… it seems that the problem is solved. Here’s how, in case anybody ever stumbles upon the same thing:

When a parameter is changed via GUI interaction, I set a flag GUIinteraction=true, and only call UpdateParametersFromFilter in Editor::ChangeListenerCallback when GUIinteraction is false, i.e. when the parameter change comes from the host or a program change. This seems to work in all hosts but in Ableton under Windows, for reasons unknown to me. But it can be resolved by adding another flag in UpdateParametersFromFilter and then only apply changes in ComponentMovedOrResized if this flag is false. Pretty hacky, but it seems to work. Otherwise Ableton can get into a loop of ComponentMoved->CallbackFromFilter->UpdateParametersFromFilter->ComponentMoved and so on…