X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Data.cpp;h=e3020d992e929c8f6d9d7577cf804bedec53809f;hb=refs%2Ftags%2FV_1.2.1;hp=b6c27518e4fe1a9bc8c84d4bfc516a418d769c34;hpb=5fb260b84b7e7c7a352cacb5a72ada3b235d1175;p=modules%2Fshaper.git diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index b6c27518e..e3020d992 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -45,6 +45,9 @@ static const int kFlagInHistory = 0; // 1 - is displayed or not static const int kFlagDisplayed = 1; +// invalid data +const static std::shared_ptr kInvalid(new Model_Data()); + Model_Data::Model_Data() : mySendAttributeUpdated(true) { } @@ -306,7 +309,10 @@ void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) { std::shared_ptr aRes = std::dynamic_pointer_cast(myObject); - if (aRes) { + // the second condition is for history upper than concealment causer, so the feature result may + // be displayed and previewed; also for avoiding of quick show/hide on history + // moving deep down + if (aRes && !theFeature->isDisabled()) { aRes->setIsConcealed(true); } } @@ -407,3 +413,13 @@ void Model_Data::setDisplayed(const bool theDisplay) aECreator->sendUpdated(myObject, EVENT_DISP); } } + +std::shared_ptr Model_Data::invalidPtr() +{ + return kInvalid; +} + +std::shared_ptr Model_Data::invalidData() +{ + return kInvalid; +}