From: mpv Date: Mon, 7 Jul 2014 10:10:56 +0000 (+0400) Subject: Attaching a debug OCAF browser plugin X-Git-Tag: V_0.4.4~206 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a6e18c9e2793cc467da1ce82e14487dca06653c1;p=modules%2Fshaper.git Attaching a debug OCAF browser plugin --- diff --git a/src/Config/Config_ModuleReader.cpp b/src/Config/Config_ModuleReader.cpp index c533e3e3e..ab9a42f35 100644 --- a/src/Config/Config_ModuleReader.cpp +++ b/src/Config/Config_ModuleReader.cpp @@ -90,14 +90,14 @@ void Config_ModuleReader::loadLibrary(const std::string theLibName) #ifdef WIN32 HINSTANCE aModLib = ::LoadLibrary(aFileName.c_str()); - if (!aModLib) { + if (!aModLib && theLibName != "DFBrowser") { // don't shor error for internal debugging tool std::string errorMsg = "Failed to load " + aFileName; std::cerr << errorMsg << std::endl; Events_Error::send(errorMsg); } #else void* aModLib = dlopen( aFileName.c_str(), RTLD_LAZY | RTLD_GLOBAL ); - if ( !aModLib ) { + if ( !aModLib && theLibName != "DFBrowser") { // don't shor error for internal debugging tool std::cerr << "Failed to load " << aFileName.c_str() << std::endl; } #endif diff --git a/src/Config/plugins.xml b/src/Config/plugins.xml index 14a91e345..e54794df6 100644 --- a/src/Config/plugins.xml +++ b/src/Config/plugins.xml @@ -3,4 +3,5 @@ + diff --git a/src/Model/Model_Document.h b/src/Model/Model_Document.h index adc4846ec..eaedf13db 100644 --- a/src/Model/Model_Document.h +++ b/src/Model/Model_Document.h @@ -116,6 +116,7 @@ protected: friend class Model_Application; friend class Model_PluginManager; + friend class DFBrowser; private: std::string myID; ///< identifier of the document in the application diff --git a/src/Model/Model_PluginManager.cpp b/src/Model/Model_PluginManager.cpp index 00ffa6678..d26ccd144 100644 --- a/src/Model/Model_PluginManager.cpp +++ b/src/Model/Model_PluginManager.cpp @@ -73,6 +73,8 @@ boost::shared_ptr Model_PluginManager::currentDocument() void Model_PluginManager::setCurrentDocument(boost::shared_ptr theDoc) { myCurrentDoc = theDoc; + static Events_Message aMsg(Events_Loop::eventByName("CurrentDocumentChanged")); + Events_Loop::loop()->send(aMsg); } boost::shared_ptr Model_PluginManager::copy(