From 328d5958483ceb33cee74def6c947111182b5af0 Mon Sep 17 00:00:00 2001 From: RJ Ryan Date: Fri, 3 Jan 2014 16:21:55 -0500 Subject: Normalize potmeter widget values to [0.0, 1.0] instead of [0.0, 127.0]. This is another step towards getting rid of MIDI assumptions that are baked into the widget system. * Control parameter space for potmeters is now [0.0, 1.0] instead of [0.0, 127.0]. * Non-linearity of parameter space (64 being the center value) now only applies to MIDI, not widgets. * Fix all potmeter-style widgets to use [0.0, 1.0] for parameter values. --- src/widget/wdisplay.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/widget/wdisplay.cpp') diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index 0d8bbf9cb5..7c325e598a 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -108,8 +108,7 @@ void WDisplay::setPixmap(QVector* pPixmaps, int iPos, } int WDisplay::getActivePixmapIndex() const { - return static_cast( - m_value * static_cast(m_pixmaps.size()) / 128.0); + return static_cast(m_value * m_pixmaps.size()); } void WDisplay::paintEvent(QPaintEvent* ) { -- cgit v1.2.3