Gui: fix linear dragger increments when the multFactor is set

This commit is contained in:
captain0xff
2025-12-22 02:55:22 +05:30
committed by Max Wilfinger
parent 2dbefaadce
commit e094df74cd

View File

@@ -179,7 +179,9 @@ void LinearGizmo::setDragLength(double dragLength)
void LinearGizmo::setGeometryScale(float scale)
{
dragger->geometryScale = SbVec3f(scale, scale, scale);
dragger->translationIncrement = std::pow(10.0f, std::floor(std::log10(scale)));
// Scales the dragger increment in exponents of 10 based on the zoom level (scale)
constexpr float base = 10.0F;
dragger->translationIncrement = multFactor * std::pow(base, std::floor(std::log10(scale)));
}
SoLinearDraggerContainer* LinearGizmo::getDraggerContainer()