]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Attaching a debug OCAF browser plugin
authormpv <mikhail.ponikarov@opencascade.com>
Mon, 7 Jul 2014 10:10:56 +0000 (14:10 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Mon, 7 Jul 2014 10:10:56 +0000 (14:10 +0400)
src/Config/Config_ModuleReader.cpp
src/Config/plugins.xml
src/Model/Model_Document.h
src/Model/Model_PluginManager.cpp

index c533e3e3e92b69565f2a5494ee1bbdb9aeaef5d6..ab9a42f351c9fcd977979801ef23a02fd34aa5bc 100644 (file)
@@ -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
index 14a91e3452a9f14d89b4f228b6382f69a3c16c4a..e54794df6bcae5207337f07b5d70121752445c48 100644 (file)
@@ -3,4 +3,5 @@
   <plugin library="SketchPlugin" configuration="plugin-Sketch.xml"/>
   <plugin library="ConstructionPlugin" configuration="plugin-Construction.xml"/>
   <plugin library="SketchSolver"/>
+  <plugin library="DFBrowser"/>
 </plugins>
index adc4846eccd0520a6eeb8bfe69aea132557342c8..eaedf13db8a4c6b230f8413e3d69d08d60752319 100644 (file)
@@ -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
index 00ffa6678d935937f5e678e4d4f0669b0bcae11e..d26ccd144e6546995c9bf25521cd92b93b0ef0e1 100644 (file)
@@ -73,6 +73,8 @@ boost::shared_ptr<ModelAPI_Document> Model_PluginManager::currentDocument()
 void Model_PluginManager::setCurrentDocument(boost::shared_ptr<ModelAPI_Document> theDoc)
 {
   myCurrentDoc = theDoc;
+  static Events_Message aMsg(Events_Loop::eventByName("CurrentDocumentChanged"));
+  Events_Loop::loop()->send(aMsg);
 }
 
 boost::shared_ptr<ModelAPI_Document> Model_PluginManager::copy(