From cec4f7aed11f32d39b6de2cb70be470742c41c76 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Sun, 17 Jan 2016 10:40:01 -0500 Subject: [PATCH] Fix for being unable to set maximum gain --- src/visual/GainCanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visual/GainCanvas.cpp b/src/visual/GainCanvas.cpp index a098d63..4235674 100644 --- a/src/visual/GainCanvas.cpp +++ b/src/visual/GainCanvas.cpp @@ -112,7 +112,7 @@ void GainCanvas::SetLevel() { if (panelHit >= 0) { gainInfo[panelHit]->levelPanel.setSize(1.0, hitResult.y); gainInfo[panelHit]->levelPanel.setPosition(0.0, (-1.0+(hitResult.y))); - gainInfo[panelHit]->current = gainInfo[panelHit]->low+(hitResult.y * (gainInfo[panelHit]->high-gainInfo[panelHit]->low)); + gainInfo[panelHit]->current = round(gainInfo[panelHit]->low+(hitResult.y * (gainInfo[panelHit]->high-gainInfo[panelHit]->low))); gainInfo[panelHit]->changed = true; gainInfo[panelHit]->valuePanel.setText(std::to_string(int(gainInfo[panelHit]->current))); }