Double clicking isn’t outputting the debugging message. Later in the code, I’m drawing a pink box where the component is located so I can clearly see where it is:
/** Occurs when the left mouse button is pressed a second time on the same Widget within a time duration.
Must consume the Button event (on left button press) to receive this event.
*/
struct DoubleClickEvent : BaseEvent {};
virtual void onDoubleClick(const DoubleClickEvent& e) {}
So I think you also a “e.consume(this);” inside “onButton” like this (from ParamWidget)
void ParamWidget::onButton(const ButtonEvent& e) {
OpaqueWidget::onButton(e);
// Touch parameter
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == 0) {
if (module) {
APP->scene->rack->touchedParam = this;
}
e.consume(this);
}
// Right click to open context menu
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT && (e.mods & RACK_MOD_MASK) == 0) {
destroyTooltip();
createContextMenu();
e.consume(this);
}
}