Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary method
[modules/shaper.git]
/
src
/
Model
/
Model_AttributeRefAttr.cpp
diff --git
a/src/Model/Model_AttributeRefAttr.cpp
b/src/Model/Model_AttributeRefAttr.cpp
index f399ba5be5405853d6c4ed7882c27d37ba30af77..0c24fe3e1b762cfa047e634473aca9408b288c2c 100644
(file)
--- a/
src/Model/Model_AttributeRefAttr.cpp
+++ b/
src/Model/Model_AttributeRefAttr.cpp
@@
-46,7
+46,7
@@
void Model_AttributeRefAttr::setObject(ObjectPtr theObject)
{
// the back reference from the previous object to the attribute should be removed
ObjectPtr anObject = object();
{
// the back reference from the previous object to the attribute should be removed
ObjectPtr anObject = object();
- if (theObject && (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) {
+ if (theObject
.get()
&& (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) {
REMOVE_BACK_REF(anObject);
std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
REMOVE_BACK_REF(anObject);
std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
@@
-84,6
+84,14
@@
ObjectPtr Model_AttributeRefAttr::object()
return ObjectPtr();
}
return ObjectPtr();
}
+bool Model_AttributeRefAttr::isInitialized()
+{
+ if (myRef->Get() == myRef->Label()) { // empty is not initialized: sketch parallelity
+ return false;
+ }
+ return ModelAPI_AttributeRefAttr::isInitialized();
+}
+
Model_AttributeRefAttr::Model_AttributeRefAttr(TDF_Label& theLabel)
{
myIsInitialized = theLabel.FindAttribute(TDataStd_Comment::GetID(), myID) == Standard_True;
Model_AttributeRefAttr::Model_AttributeRefAttr(TDF_Label& theLabel)
{
myIsInitialized = theLabel.FindAttribute(TDataStd_Comment::GetID(), myID) == Standard_True;