Commit e4c9d162 authored by Ivan Yossi's avatar Ivan Yossi 👌

Avoid going positive on negative x with even exponentials ratios

BUG:408442
parent a19af03f
......@@ -745,7 +745,8 @@ int KisAbstractSliderSpinBox::valueForX(int x, Qt::KeyboardModifiers modifiers)
}
//Final value
qreal realvalue = ((dValues * pow(percent, d->exponentRatio)) + minDbl);
qreal exp_percent = pow(percent, d->exponentRatio);
qreal realvalue = ((dValues * (percent * exp_percent >= 0 ? exp_percent : -exp_percent)) + minDbl);
//If key CTRL is pressed, round to the closest step.
if( modifiers & Qt::ControlModifier ) {
qreal fstep = d->fastSliderStep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment