The following property panel will be opened:
-.. figure:: images/Split.png
+.. figure:: images/Split_panel.png
:align: center
**Split operation**
}
theExtIter.Next();
} else { // internal document object
- anObj = theDoc->objects()->object(theLIter.Value());
+ TDF_Label aLab = theLIter.Value();
+ if (!aLab.IsNull())
+ anObj = theDoc->objects()->object(theLIter.Value());
}
}
return anObj;
std::shared_ptr<Model_Session> aSession =
std::dynamic_pointer_cast<Model_Session>(Model_Session::get());
if (isOk) {
+ // keep handle to avoid destruction of the document until myObjs works on it
+ Handle(TDocStd_Document) anOldDoc = myDoc;
myDoc = aLoaded;
myDoc->SetUndoLimit(UNDO_LIMIT);
aSession->setCheckTransactions(false);
if (myObjs)
delete myObjs;
+ anOldDoc.Nullify();
myObjs = new Model_Objects(myDoc->Main()); // synchronization is inside
myObjs->setOwner(theThis);
// update the current features status
{
Transaction anAppended = myTransactions.back();
myTransactions.pop_back();
+ if (!myNestedNum.empty())
+ (*myNestedNum.rbegin())--;
if (!myTransactions.empty()) { // if it is empty, just forget the appended
myTransactions.back().myOCAFNum += anAppended.myOCAFNum;
}
if (anUpdated.get()) {
if (addModified(anUpdated, FeaturePtr()))
aSomeModified = true;
- if (myUpdateBlocked) { // execute this feature anyway to show the current result
- /*if (!anUpdated->isStable() && anUpdated->results().size() && (
- anUpdated->firstResult()->groupName() == ModelAPI_ResultBody::group() ||
- anUpdated->firstResult()->groupName() == ModelAPI_ResultPart::group())) {
- if (aFactory->validate(anUpdated)) {
- executeFeature(anUpdated);
- redisplayWithResults(anUpdated, ModelAPI_StateNothing, false);
- static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
- aLoop->flush(EVENT_DISP);
- }
- }*/
- }
} else {
// process the updated result as update of features that refers to this result
const std::set<std::shared_ptr<ModelAPI_Attribute> >&
if (!isPostponedMain) {
bool aDoExecute = true;
if (myUpdateBlocked) {
- if (!theFeature->isStable()) {
+ if (!theFeature->isStable() || (theFeature->getKind().size() > 6 &&
+ theFeature->getKind().substr(0, 6) == "Sketch")) { // automatic update sketch elements
aDoExecute = true;
} else if (theFeature->results().size()) { // execute only not persistent results features
aDoExecute = !theFeature->isPersistentResult();
aAction->setShortcut(Qt::Key_F2);
addAction("RENAME_CMD", aAction);
+#ifdef HAVE_SALOME
aAction = ModuleBase_Tools::createAction(QIcon(":pictures/move_to_end.png"),
XGUI_Workshop::MOVE_TO_END_COMMAND, this);
addAction("MOVE_CMD", aAction);
aAction = ModuleBase_Tools::createAction(QIcon(":pictures/move_to_end_split.png"),
XGUI_Workshop::MOVE_TO_END_SPLIT_COMMAND, this);
addAction("MOVE_SPLIT_CMD", aAction);
+#endif
aAction = ModuleBase_Tools::createAction(QIcon(":pictures/clean_history.png"),
tr("Clean history"), aDesktop);
if (!(hasParameter || hasFeature))
action("SHOW_ONLY_CMD")->setEnabled(true);
}
+#ifdef HAVE_SALOME
else if (hasFeature && myWorkshop->canMoveFeature()) {
action("MOVE_CMD")->setEnabled(true);
action("MOVE_SPLIT_CMD")->setEnabled(true);
}
+#endif
if( aMgr->activeDocument() == aObject->document() )
{