summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widget/wpushbutton.cpp17
-rw-r--r--src/widget/wpushbutton.h2
2 files changed, 11 insertions, 8 deletions
diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp
index 7157179b10..b85e122f42 100644
--- a/src/widget/wpushbutton.cpp
+++ b/src/widget/wpushbutton.cpp
@@ -281,12 +281,17 @@ void WPushButton::mouseReleaseEvent(QMouseEvent * e) {
if (rightClick) {
// This is the secondary clickButton function, it does not change
- // m_value due the leak of visual feedback we do not allow a toggle
- // function. It is always a pushbutton, so "RightClickIsPushButton"
- // is obsolete
- m_bPressed = false;
- emit(valueChangedRightUp(0.0f));
- update();
+ // m_fValue due the leak of visual feedback we do not allow a toggle
+ // function
+ if (m_bRightClickForcePush) {
+ m_bPressed = false;
+ emit(valueChangedRightUp(0.0f));
+ update();
+ } else if (m_iNoStates == 1) {
+ m_bPressed = false;
+ emit(valueChangedRightUp(0.0f));
+ update();
+ }
return;
}
diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h
index aa54320ef9..e2cef17bfa 100644
--- a/src/widget/wpushbutton.h
+++ b/src/widget/wpushbutton.h
@@ -76,8 +76,6 @@ class WPushButton : public WWidget
ControlPushButton::ButtonMode m_leftButtonMode;
ControlPushButton::ButtonMode m_rightButtonMode;
QTimer m_clickTimer;
- // to distinguish if the Button is painted by the indicator or the main value
- bool m_indicatorConnected;
};
#endif