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
updated copyright message
[modules/shaper.git]
/
src
/
Model
/
Model_Session.cpp
diff --git
a/src/Model/Model_Session.cpp
b/src/Model/Model_Session.cpp
index eb4ab5ff98229ea4a7fc46074a9352c61c304bc8..b80cdd8eaf92737a34e09d233bece4bb6f4f0dc6 100644
(file)
--- a/
src/Model/Model_Session.cpp
+++ b/
src/Model/Model_Session.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-202
1 CEA/DEN, EDF R&D
+// Copyright (C) 2014-202
3 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-21,7
+21,6
@@
#include <ModelAPI_Feature.h>
#include <ModelAPI_Plugin.h>
#include <Model_Data.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Plugin.h>
#include <Model_Data.h>
-#include <Model_Document.h>
#include <Model_Objects.h>
#include <Model_Application.h>
#include <Model_Events.h>
#include <Model_Objects.h>
#include <Model_Application.h>
#include <Model_Events.h>
@@
-60,7
+59,9
@@
static Model_Session* myImpl = new Model_Session();
bool Model_Session::load(const char* theFileName)
{
bool Model_Session::load(const char* theFileName)
{
+ myIsLoading = true;
bool aRes = ROOT_DOC->load(theFileName, "root", ROOT_DOC);
bool aRes = ROOT_DOC->load(theFileName, "root", ROOT_DOC);
+ myIsLoading = false;
return aRes;
}
return aRes;
}
@@
-72,11
+73,11
@@
bool Model_Session::save(const char* theFileName, std::list<std::string>& theRes
void Model_Session::closeAll()
{
Model_Application::getApplication()->deleteAllDocuments();
void Model_Session::closeAll()
{
Model_Application::getApplication()->deleteAllDocuments();
- static const Events_ID aDoc
ChangeEvent = Events_Loop::eventByName(EVENT_DOCUMENT_CHANG
ED);
+ static const Events_ID aDoc
sCloseEvent = Events_Loop::eventByName(EVENT_DOCUMENTS_CLOS
ED);
myCurrentDoc = NULL;
myCurrentDoc = NULL;
- static std::shared_ptr<Events_Message> aMsg(new Events_Message(aDoc
Chang
eEvent));
+ static std::shared_ptr<Events_Message> aMsg(new Events_Message(aDoc
sClos
eEvent));
Events_Loop::loop()->send(aMsg);
Events_Loop::loop()->send(aMsg);
- Events_Loop::loop()->flush(aDoc
Chang
eEvent);
+ Events_Loop::loop()->flush(aDoc
sClos
eEvent);
}
void Model_Session::startOperation(const std::string& theId, const bool theAttachedToNested)
}
void Model_Session::startOperation(const std::string& theId, const bool theAttachedToNested)
@@
-179,6
+180,16
@@
std::list<std::string> Model_Session::redoList()
return ROOT_DOC->redoList();
}
return ROOT_DOC->redoList();
}
+void Model_Session::clearUndoRedo()
+{
+ return ROOT_DOC->clearUndoRedo();
+}
+
+bool Model_Session::checkLicense(const std::string& thePluginName)
+{
+ return getPlugin(thePluginName);
+}
+
ModelAPI_Plugin* Model_Session::getPlugin(const std::string& thePluginName)
{
if (myPluginObjs.find(thePluginName) == myPluginObjs.end()) {
ModelAPI_Plugin* Model_Session::getPlugin(const std::string& thePluginName)
{
if (myPluginObjs.find(thePluginName) == myPluginObjs.end()) {
@@
-443,6
+454,7
@@
Model_Session::Model_Session()
{
myPluginsInfoLoaded = false;
myCheckTransactions = true;
{
myPluginsInfoLoaded = false;
myCheckTransactions = true;
+ myIsLoading = false;
ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
// register the configuration reading listener
Events_Loop* aLoop = Events_Loop::loop();
ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
// register the configuration reading listener
Events_Loop* aLoop = Events_Loop::loop();
@@
-669,3
+681,10
@@
void Model_Session::blockAutoUpdate(const bool theBlock)
}
}
}
}
}
}
+
+#ifdef TINSPECTOR
+Handle(TDocStd_Application) Model_Session::application()
+{
+ return Model_Application::getApplication();
+}
+#endif