From 17b5c476515fff6fef831782afaf4204775efd10 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Tue, 21 Jan 2020 11:27:56 +0100 Subject: [PATCH] update 'pressed' also for pushbuttons with 1+ states via onConnectedControlChanged --- src/widget/wpushbutton.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 063d7c7dfda..b8f425e9e7f 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -290,9 +290,7 @@ void WPushButton::onConnectedControlChanged(double dParameter, double dValue) { Q_UNUSED(dParameter); // Enums are not currently represented using parameter space so it doesn't // make sense to use the parameter here yet. - if (m_iNoStates == 1) { - m_bPressed = (dValue == 1.0); - } + m_bPressed = (dValue == 1.0); restyleAndRepaint(); }