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
Issue #355 Delete: elements of sketch and constraints
[modules/shaper.git]
/
src
/
Model
/
Model_ResultPart.cpp
diff --git
a/src/Model/Model_ResultPart.cpp
b/src/Model/Model_ResultPart.cpp
index cc1666e5b3a43976ba1d61d718bebbcc69565d1d..0392787f3c7a2b7a44558b0b851a81a3914a5eb6 100644
(file)
--- a/
src/Model/Model_ResultPart.cpp
+++ b/
src/Model/Model_ResultPart.cpp
@@
-36,12
+36,19
@@
void Model_ResultPart::activate()
{
std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
{
std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
- if (!aDocRef->value()) { // create (or open) a document if it is not yet created
+ if (!aDocRef->value()
.get()
) { // create (or open) a document if it is not yet created
std::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
if (aDoc) {
aDocRef->setValue(aDoc);
}
}
std::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
if (aDoc) {
aDocRef->setValue(aDoc);
}
}
- if (aDocRef->value()
)
+ if (aDocRef->value()
.get()) {
ModelAPI_Session::get()->setActiveDocument(aDocRef->value());
ModelAPI_Session::get()->setActiveDocument(aDocRef->value());
+ }
+}
+
+bool Model_ResultPart::isActivated()
+{
+ std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
+ return aDocRef->value().get();
}
}