X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Session.cpp;h=04229f2c2257af2b46404547d8a463d4c23fe384;hb=refs%2Ftags%2FV_1.2.1;hp=69c2f1b162d5421345e41028f8f37e41a676688f;hpb=caaf3d592b637efa8ad5183b86234ffe59aaa82d;p=modules%2Fshaper.git diff --git a/src/Model/Model_Session.cpp b/src/Model/Model_Session.cpp index 69c2f1b16..04229f2c2 100644 --- a/src/Model/Model_Session.cpp +++ b/src/Model/Model_Session.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,7 @@ static Model_Session* myImpl = new Model_Session(); bool Model_Session::load(const char* theFileName) { - bool aRes = ROOT_DOC->load(theFileName); + bool aRes = ROOT_DOC->load(theFileName, ROOT_DOC); return aRes; } @@ -47,7 +48,6 @@ bool Model_Session::save(const char* theFileName, std::list& theRes void Model_Session::closeAll() { - ROOT_DOC->close(true); Model_Application::getApplication()->deleteAllDocuments(); } @@ -216,7 +216,7 @@ void Model_Session::setActiveDocument( if (aDoc.get()) { bool aWasChecked = myCheckTransactions; setCheckTransactions(false); - aDoc->synchronizeFeatures(false, true, true); + aDoc->objects()->synchronizeFeatures(false, true, true); if (aWasChecked) setCheckTransactions(true); } @@ -249,6 +249,11 @@ std::list > Model_Session::allOpenedDocuments return aResult; } +bool Model_Session::isLoadByDemand(const std::string theDocID) +{ + return Model_Application::getApplication()->isLoadByDemand(theDocID); +} + std::shared_ptr Model_Session::copy( std::shared_ptr theSource, std::string theID) { @@ -266,7 +271,7 @@ std::shared_ptr Model_Session::copy( aRT->SetRelocation(aSourceRoot, aTargetRoot); TDF_CopyTool::Copy(aDS, aRT); - aNew->synchronizeFeatures(false, true, true); + aNew->objects()->synchronizeFeatures(false, true, true); return aNew; }