void Model_Session::closeAll()
{
Model_Application::getApplication()->deleteAllDocuments();
- ROOT_DOC->close(true);
+ //ROOT_DOC->close(true);
}
void Model_Session::startOperation(const std::string& theId)
: PartSet_FeaturesModel(theParent)
{
}
+ ~PartSet_PartModel()
+ {
+ myPart = FeaturePtr();
+ }
/// Set part id
/// \param theId a new id
foreach (PartSet_PartModel* aPart, myPartModels)
delete aPart;
myPartModels.clear();
+ myActivePartModel = 0;
}
ObjectPtr PartSet_DocumentDataModel::object(const QModelIndex& theIndex) const
myIndexes.removeAt(aId);
aToRemove.removeLast();
}
- delete theModel;
+ if (theModel == myActivePartModel)
+ myActivePartModel = 0;
myPartModels.removeAll(theModel);
+ delete theModel;
}
SessionPtr aMgr = ModelAPI_Session::get();
aMgr->closeAll();
- objectBrowser()->clearContent();
}
//**************************************************************