Gui: fix linear dragger increments when the multFactor is set

(cherry picked from commit 5cc05a1ab2)
This commit is contained in:
captain0xff
2025-12-25 09:11:29 +01:00
committed by Max Wilfinger
parent 3901c8f1de
commit bffe90dce6
+3 -1
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()