Fix for being unable to set maximum gain

This commit is contained in:
Charles J. Cliffe 2016-01-17 10:40:01 -05:00
parent 1b491093cb
commit cec4f7aed1

View File

@ -112,7 +112,7 @@ void GainCanvas::SetLevel() {
if (panelHit >= 0) { if (panelHit >= 0) {
gainInfo[panelHit]->levelPanel.setSize(1.0, hitResult.y); gainInfo[panelHit]->levelPanel.setSize(1.0, hitResult.y);
gainInfo[panelHit]->levelPanel.setPosition(0.0, (-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]->changed = true;
gainInfo[panelHit]->valuePanel.setText(std::to_string(int(gainInfo[panelHit]->current))); gainInfo[panelHit]->valuePanel.setText(std::to_string(int(gainInfo[panelHit]->current)));
} }