While testing my plugin under 1.0, I discovered that rapidly pressing a button appeared to work most, but not all, of the time.
My bug was that I was not overriding ParamWidget::onDoubleClick
. Its default behavior is to call ParamWidget::reset
which I was overriding, and which in turn was turning my button off.
Adding an empty override:
void onDoubleClick(const event::DoubleClick& ) override {
}
solved my problem. Adding this here in case it helps someone else, or in case there’s a better way.