aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
- if (theMarkUpdated) {
- aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
- }
+ aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TOHIDE));
boost::static_pointer_cast<Model_Session>(Model_Session::get())
} else if (theMessage->eventID() == kCreatedEvent || theMessage->eventID() == kUpdatedEvent) {
boost::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
boost::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ if (theMessage->eventID() == kCreatedEvent) {
+ myJustCreatedOrUpdated.clear();
+ }
const std::set<ObjectPtr>& anObjs = aMsg->objects();
std::set<ObjectPtr>::const_iterator anObjIter = anObjs.cbegin();
for(; anObjIter != anObjs.cend(); anObjIter++)
}
}
myUpdated.clear();
- // flush
+ if (theMessage->eventID() == kUpdatedEvent) {
+ // flush updates without execution now (updates are caused by this process)
+ aLoop->flush(kUpdatedEvent);
+ }
+ // flush to update display
static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
aLoop->flush(EVENT_DISP);
//Events_LongOp::end(this);
// ============================================================================
bool SketchSolver_ConstraintGroup::updateWorkplane()
{
+ if (!mySketch->data())
+ return false; // case sketch is deleted
// Get parameters of workplane
boost::shared_ptr<ModelAPI_Attribute> aDirX = mySketch->data()->attribute(
SketchPlugin_Sketch::DIRX_ID());