From d7433466a0d5d1c8d169ed4c633fd40f2940ba28 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 12 May 2025 09:13:14 -0500 Subject: [PATCH] TD: Fix hatch size constraint Commit 1155f0d7 changed `UnitsApi::getDecimals()` from `int` to `size_t`, which changes the meaning of the negation since it is now unsigned. Cast it to an integer before the negation to restore the old behavior. --- src/Mod/TechDraw/Gui/ViewProviderHatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp b/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp index cce1744ad8..3b2f90c72d 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp @@ -46,7 +46,7 @@ using namespace TechDrawGui; //App::PropertyFloatConstraint::Constraints ViewProviderHatch::scaleRange = {Precision::Confusion(), // std::numeric_limits::max(), // pow(10, - Base::UnitsApi::getDecimals())}; -App::PropertyFloatConstraint::Constraints ViewProviderHatch::scaleRange = {pow(10, - Base::UnitsApi::getDecimals()), +App::PropertyFloatConstraint::Constraints ViewProviderHatch::scaleRange = {pow(10, - static_cast(Base::UnitsApi::getDecimals())), 1000.0, 0.1};