Why can't you map Squinky Labs drop down menus?

@Jens.Peter.Nielsen pointed out yesterday that “my” drop down menu widgets can’t be mapped like normal knobs. At first I didn’t believe it, but sure enough it is a 100% bug.

When I wrote these things years ago I probably didn’t even know what midi mapping is :wink:

Anyway, it turns out that to be mappable your widget must be a ParamWidget, and it must correctly call setTouchedParam on a button click.

It turns out that while all my old widgets are ParamWidgets, this particular one overrides ParamWidget::onButton() and does not correctly set the touched param.

Here’s a quick fix:

inline void PopupMenuParamWidget::onButton(const ::rack::event::Button &e) {
    if ((e.button == GLFW_MOUSE_BUTTON_LEFT) && (e.action == GLFW_PRESS)) {
        if (module) {
			APP->scene->rack->setTouchedParam (this);
        ::rack::event::Action ea;
        sq::consumeEvent(&e, this);

Once this bug is fixed, it works like you would expect:


Now, I just need to see if @robert.kock is interested fixing this in the Squinky Labs modules in the library manager.


Thanks looking into this Bruce.

If the fix is as easy as you describe I am sure it will make it into the next release :wink:

I am planning to release by the end of this week, so hopefully it will be available soon.


Cool. I logged a bug on GitHub with a link here.

@steve this is the post. My dropdowns map just fine to synths knobs. Once I fixed this terrible bug.