static const int TAG_EXTERNAL_CONSTRUCTIONS = 5;
Model_Document::Model_Document(const int theID, const std::string theKind)
- : myID(theID), myKind(theKind), myIsActive(false),
+ : myID(theID), myKind(theKind), myIsActive(false), myIsSetCurrentFeature(false),
myDoc(new TDocStd_Document("BinOcaf")) // binary OCAF format
{
#ifdef TINSPECTOR
Handle(Model_Application) anApp = Model_Application::getApplication();
if (isRoot()) {
#ifdef WIN32
- CreateDirectory(theDirName, NULL);
+ CreateDirectory((LPTSTR) theDirName, NULL);
#else
mkdir(theDirName, 0x1ff);
#endif
void Model_Document::setCurrentFeature(
std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theVisible)
{
+ if (myIsSetCurrentFeature)
+ return;
+ myIsSetCurrentFeature = true;
// blocks the flush signals to avoid each objects visualization in the viewer
// they should not be shown once after all modifications are performed
Events_Loop* aLoop = Events_Loop::loop();
std::shared_ptr<Model_Data> aData = std::static_pointer_cast<Model_Data>(theCurrent->data());
if (!aData.get() || !aData->isValid()) {
aLoop->activateFlushes(isActive);
+ myIsSetCurrentFeature = false;
return;
}
TDF_Label aFeatureLabel = aData->label().Father();
}
}
}
+ myIsSetCurrentFeature = false;
// unblock the flush signals and up them after this
aLoop->activateFlushes(isActive);
}