{
if (!checkFeatureValidity(theFeature))
return false;
+ // the external feature always should keep the up to date values, so,
+ // refresh from the solver is never needed
+ std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
+ std::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
+ if (aSketchFeature.get() && aSketchFeature->isExternal())
+ return false;
+
myStorage->refresh(true);
return myStorage->update(theFeature);
}
{
if (myIsComputed)
return;
+ myIsComputed = true;
if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)
|| theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)
|| theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_MOVED)) {
myGroups.insert(myGroups.end(), aSeparatedGroups.begin(), aSeparatedGroups.end());
}
}
+ myIsComputed = false;
}
// ============================================================================
// ============================================================================
void SketchSolver_Manager::resolveConstraints(const bool theForceUpdate)
{
- myIsComputed = true;
+ //myIsComputed = true;
bool needToUpdate = false;
static Events_ID anUpdateEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
// to avoid redisplay of each segment on update by solver one by one in the viewer
// Must be before flush because on "Updated" flush the results may be produced
// and the creation event is appeared with many new objects. If myIsComputed these
// events are missed in processEvents and some elements are not added.
- myIsComputed = false;
+ //myIsComputed = false;
if (needToUpdate || theForceUpdate)
Events_Loop::loop()->flush(anUpdateEvent);
}