X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Data.cpp;h=cbe96e2b3c043caf58214590311b078b170ec851;hb=bdbfb368d71ed11cc0391354a7d86c880cd94949;hp=b008e76c454911cbc31948f5fe1a06ec68b5008f;hpb=74a552ed6ea274b32a80acff7c752ad1888eb9fa;p=modules%2Fshaper.git diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index b008e76c4..cbe96e2b3 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -94,8 +94,12 @@ void Model_Data::setLabel(TDF_Label theLab) std::string Model_Data::name() { Handle(TDataStd_Name) aName; - if (myLab.FindAttribute(TDataStd_Name::GetID(), aName)) + if (myLab.FindAttribute(TDataStd_Name::GetID(), aName)) { +#ifdef DEBUG_NAMES + myObject->myName = TCollection_AsciiString(aName->Get()).ToCString(); +#endif return std::string(TCollection_AsciiString(aName->Get()).ToCString()); + } return ""; // not defined } @@ -118,6 +122,9 @@ void Model_Data::setName(const std::string& theName) std::dynamic_pointer_cast(myObject->document())-> changeNamingName(anOldName, theName); } +#ifdef DEBUG_NAMES + myObject->myName = theName; +#endif } AttributePtr Model_Data::addAttribute(const std::string& theID, const std::string theAttrType) @@ -295,6 +302,12 @@ void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr) if (myWasChangedButBlocked.empty() || *(myWasChangedButBlocked.rbegin()) != theAttr) myWasChangedButBlocked.push_back(theAttr); } + } else { + // trim: need to redisplay + if (myObject) { + static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY); + ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent); + } } }