#include <ModelAPI_Tools.h>
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_ResultPart.h>
+#include <ModelAPI_ResultConstruction.h>
#include <GeomAPI_Shape.h>
#include <GeomDataAPI_Point.h>
#include <GeomDataAPI_Point2D.h>
aLoop->registerListener(this, kReorderEvent);
static const Events_ID kUpdatedSel = aLoop->eventByName(EVENT_UPDATE_SELECTION);
aLoop->registerListener(this, kUpdatedSel);
- static const Events_ID kAutomaticOff = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE);
- aLoop->registerListener(this, kAutomaticOff);
- static const Events_ID kAutomaticOn = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE);
- aLoop->registerListener(this, kAutomaticOn);
// Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true";
myIsParamUpdated = false;
static const Events_ID kReorderEvent = aLoop->eventByName(EVENT_ORDER_UPDATED);
static const Events_ID kRedisplayEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
static const Events_ID kUpdatedSel = aLoop->eventByName(EVENT_UPDATE_SELECTION);
- static const Events_ID kAutomaticOff = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE);
- static const Events_ID kAutomaticOn = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE);
#ifdef DEB_UPDATE
std::cout<<"****** Event "<<theMessage->eventID().eventText()<<std::endl;
aDoExecute = true;
} else if (theFeature->results().size()) { // execute only not-results features
aDoExecute = !(theFeature->firstResult()->groupName() == ModelAPI_ResultBody::group() ||
- theFeature->firstResult()->groupName() == ModelAPI_ResultPart::group());
+ theFeature->firstResult()->groupName() == ModelAPI_ResultPart::group() ||
+ theFeature->getKind() == "Sketch");
} else {
aDoExecute = aState != ModelAPI_StateInvalidArgument;
}
{
if (theString.empty())
return false;
- std::string::const_iterator it = theString.begin();
- if (!(isalpha(*it) || (*it) == '_') || it == theString.end())
- return false;
- it++;
- for ( ; it != theString.end(); ++it ) {
- if(!(isalnum(*it) || (*it) == '_')) {
+ try {
+ std::string::const_iterator it = theString.begin();
+ if (!(isalpha(*it) || (*it) == '_') || it == theString.end())
return false;
+ it++;
+ for ( ; it != theString.end(); ++it ) {
+ if(!(isalnum(*it) || (*it) == '_')) {
+ return false;
+ }
}
+ } catch(...) {
+ return false;
}
return true;
}