From e094df74cd907ff0bd1d79246f657bf49217e4a9 Mon Sep 17 00:00:00 2001 From: captain0xff Date: Mon, 22 Dec 2025 02:55:22 +0530 Subject: [PATCH] Gui: fix linear dragger increments when the multFactor is set --- src/Gui/Inventor/Draggers/Gizmo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/Inventor/Draggers/Gizmo.cpp b/src/Gui/Inventor/Draggers/Gizmo.cpp index 99e37dcc1e..ff766c2df7 100644 --- a/src/Gui/Inventor/Draggers/Gizmo.cpp +++ b/src/Gui/Inventor/Draggers/Gizmo.cpp @@ -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()