From 4837f3fb22cf9285cc0279c5d63380f2623cd7e5 Mon Sep 17 00:00:00 2001 From: RJ Ryan Date: Fri, 10 Jan 2014 13:33:19 -0500 Subject: Remove widget values. * WWidget no longer stores a value independent of its connected controls. * Make a connection explicitly the display value. For legacy reasons this is the last connection with connectValueToWidget. * Update all WWidget descendents to use the connected display value when painting. * Push buttons update the left or right connected control for push-button behavior or toggling. This allows WPushButton to toggle a multi-state button on left and right click. This was previously impossible. --- src/widget/wdisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widget/wdisplay.cpp') diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index 614ebaa5a3..6791760f64 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -145,7 +145,7 @@ int WDisplay::getActivePixmapIndex() const { // Subtracting an epsilon prevents out of bound values at the end of the // range and biases the middle value towards the lower of the 2 center // pixmaps when there are an even number of pixmaps. - return static_cast(getValue() * numPixmaps() - 0.00001); + return static_cast(getConnectedDisplayValue() * numPixmaps() - 0.00001); } void WDisplay::paintEvent(QPaintEvent* ) { -- cgit v1.2.3