Fix calculation a dimension step.
Value for millimeters is to small.
This commit is contained in:
parent
a083d2ff18
commit
cfe46d97e4
|
@ -62,19 +62,13 @@ QVector<int> VAbstartMeasurementDimension::ValidSteps() const
|
|||
}
|
||||
else if (diff > 0)
|
||||
{
|
||||
steps.append(1);
|
||||
|
||||
auto AddStep = [&steps, diff](int step)
|
||||
for (int i=1; i < 9; ++i)
|
||||
{
|
||||
const int step = (m_units == Unit::Mm ? i * 10 : i);
|
||||
if (diff % step == 0)
|
||||
{
|
||||
steps.append(step);
|
||||
}
|
||||
};
|
||||
|
||||
for (int i=2; i < 9; ++i)
|
||||
{
|
||||
AddStep(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user