diff --git a/src/Mod/Surface/App/FeatureExtend.cpp b/src/Mod/Surface/App/FeatureExtend.cpp index 011db6da72..f2090b8fe0 100644 --- a/src/Mod/Surface/App/FeatureExtend.cpp +++ b/src/Mod/Surface/App/FeatureExtend.cpp @@ -48,38 +48,38 @@ PROPERTY_SOURCE(Surface::Extend, Part::Spline) void Surface::Extend::onChanged(const App::Property* prop) { - // using a mutex and lock to protect a recursive calling when setting the new values - if (!lockOnChangeMutex.try_lock()) return; - lockOnChangeMutex.unlock(); - std::lock_guard lock(lockOnChangeMutex); + // using a mutex and lock to protect a recursive calling when setting the new values + if (!lockOnChangeMutex.try_lock()) return; + lockOnChangeMutex.unlock(); + std::lock_guard lock(lockOnChangeMutex); - if ( ExtendUSymetric.getValue() ) - { - if (prop->getName() == ExtendUNeg.getName() - || prop->getName() == ExtendUPos.getName()) + if ( ExtendUSymetric.getValue() ) { - auto changedValue = dynamic_cast(prop); - if (changedValue) - { - ExtendUNeg.setValue(changedValue->getValue()); - ExtendUPos.setValue(changedValue->getValue()); - } + if (prop->getName() == ExtendUNeg.getName() + || prop->getName() == ExtendUPos.getName()) + { + auto changedValue = dynamic_cast(prop); + if (changedValue) + { + ExtendUNeg.setValue(changedValue->getValue()); + ExtendUPos.setValue(changedValue->getValue()); + } + } } - } - if (ExtendVSymetric.getValue()) - { - if (prop->getName() == ExtendVNeg.getName() - || prop->getName() == ExtendVPos.getName()) + if (ExtendVSymetric.getValue()) { - auto changedValue = dynamic_cast(prop); - if (changedValue) - { - ExtendVNeg.setValue(changedValue->getValue()); - ExtendVPos.setValue(changedValue->getValue()); - } + if (prop->getName() == ExtendVNeg.getName() + || prop->getName() == ExtendVPos.getName()) + { + auto changedValue = dynamic_cast(prop); + if (changedValue) + { + ExtendVNeg.setValue(changedValue->getValue()); + ExtendVPos.setValue(changedValue->getValue()); + } + } } - } - Part::Feature::onChanged(prop); + Part::Feature::onChanged(prop); } Extend::Extend() diff --git a/src/Mod/Surface/App/FeatureExtend.h b/src/Mod/Surface/App/FeatureExtend.h index c88a2fca59..a049d9ac12 100644 --- a/src/Mod/Surface/App/FeatureExtend.h +++ b/src/Mod/Surface/App/FeatureExtend.h @@ -58,7 +58,7 @@ public: short mustExecute() const; private: - virtual void onChanged(const App::Property* prop) override; + virtual void onChanged(const App::Property* prop) override; }; }//Namespace Surface