diff --git a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp index 1c481cd6fa..669180856b 100644 --- a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp @@ -158,18 +158,15 @@ double FeatureBlendCurve::RelativeToRealParameters(double relativeValue, double void FeatureBlendCurve::onChanged(const App::Property *prop) { if (prop == &StartContinuity) { - auto changedStartProp = dynamic_cast(prop); - - if (changedStartProp->getValue() > (maxDegree - 2 - EndContinuity.getValue())) { - - StartContinuity.setValue(maxDegree - 2 - EndContinuity.getValue()); + long maxValue = maxDegree - 2 - EndContinuity.getValue(); + if (StartContinuity.getValue() > maxValue) { + StartContinuity.setValue(maxValue); } } else if (prop == &EndContinuity) { - auto changedEndProp = dynamic_cast(prop); - - if (changedEndProp->getValue() > (maxDegree - 2 - StartContinuity.getValue())) { - EndContinuity.setValue(maxDegree - 2 - StartContinuity.getValue()); + long maxValue = maxDegree - 2 - StartContinuity.getValue(); + if (EndContinuity.getValue() > maxValue) { + EndContinuity.setValue(maxValue); } } if (prop == &StartContinuity || prop == &StartParameter || prop == &StartSize || prop == &EndContinuity || prop == &EndParameter || prop == &EndSize) { diff --git a/src/Mod/Surface/App/Blending/FeatureBlendCurve.h b/src/Mod/Surface/App/Blending/FeatureBlendCurve.h index a792e83bca..9ea76f1851 100644 --- a/src/Mod/Surface/App/Blending/FeatureBlendCurve.h +++ b/src/Mod/Surface/App/Blending/FeatureBlendCurve.h @@ -63,7 +63,6 @@ public: private: BlendPoint GetBlendPoint(App::PropertyLinkSub &link, App::PropertyFloatConstraint ¶m, App::PropertyIntegerConstraint &Continuity); double RelativeToRealParameters(double, double, double); - bool lockOnChangeMutex{false}; protected: void onChanged(const App::Property *prop) override;