Skip to content

Commit

Permalink
Surface: optimize Extend::onChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 3, 2020
1 parent c77828e commit 74ad645
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Mod/Surface/App/FeatureExtend.cpp
Expand Up @@ -161,10 +161,9 @@ void Extend::onChanged(const App::Property* prop)
lockOnChangeMutex.unlock();
std::lock_guard<std::mutex> lock(lockOnChangeMutex);

if ( ExtendUSymetric.getValue() )
if (ExtendUSymetric.getValue())
{
if (prop->getName() == ExtendUNeg.getName()
|| prop->getName() == ExtendUPos.getName())
if (prop == &ExtendUNeg || prop == &ExtendUPos)
{
auto changedValue = dynamic_cast<const App::PropertyFloat*>(prop);
if (changedValue)
Expand All @@ -174,10 +173,10 @@ void Extend::onChanged(const App::Property* prop)
}
}
}

if (ExtendVSymetric.getValue())
{
if (prop->getName() == ExtendVNeg.getName()
|| prop->getName() == ExtendVPos.getName())
if (prop == &ExtendVNeg || prop == &ExtendVPos)
{
auto changedValue = dynamic_cast<const App::PropertyFloat*>(prop);
if (changedValue)
Expand Down

0 comments on commit 74ad645

Please sign in to comment.