myGroups.find(theID.eventText());
if (aMyGroup != myGroups.end()) { // really sends
Events_MessageGroup* aGroup = aMyGroup->second;
- send(*aGroup, false);
myGroups.erase(aMyGroup);
+ send(*aGroup, false);
delete aGroup;
}
}
boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
boost::shared_ptr<ModelAPI_AttributeDouble> aReal = aData->real(anId.toStdString());
aReal->setValue(theValue);
+ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
}
void ModuleBase_Operation::storeCustomValue()
#include <Config_Keywords.h>
+#include <Events_Loop.h>
+#include <Model_Events.h>
+
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
#include <GeomDataAPI_Point2D.h>
bool isBlocked = this->blockSignals(true);
aPoint->setValue(myXSpin->value(), myYSpin->value());
+ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
+
this->blockSignals(isBlocked);
return true;
}
std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
for (; anIt != aLast; anIt++) {
boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
- if (!aFeature || aFeature == feature())
+ if (!aFeature)
continue;
Model_FeatureUpdatedMessage aMessage(aFeature, anEvent);
}
// Solve the set of constraints
- resolveConstraints(isModifiedEvt);
+ resolveConstraints();
}
else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_DELETED))
{
return boost::shared_ptr<SketchPlugin_Feature>();
}
-void SketchSolver_ConstraintManager::resolveConstraints(const bool needEvent)
+void SketchSolver_ConstraintManager::resolveConstraints()
{
std::vector<SketchSolver_ConstraintGroup*>::iterator aGroupIter;
for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++)
(*aGroupIter)->resolveConstraints();
// Features may be updated => send events
- if (needEvent)
- Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
+ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
}
void updateEntity(boost::shared_ptr<SketchPlugin_Feature> theFeature);
/** \brief Goes through the list of groups and solve the constraints
- * \param[in] needEvent shows that some features are probably updated and Update event should be thrown
*/
- void resolveConstraints(const bool needEvent);
+ void resolveConstraints();
private:
class SketchSolver_ConstraintGroup;