Salome HOME
Merge branch 'nrn/Lot2/AutoColor' into master
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 01b2fff9959dfcac486202faf9db041d19480b41..4342023ae4653ec085b1b1636606393714314c04 100644 (file)
 #include <iterator>
 
 #ifdef TINSPECTOR
-#include <CDF_Session.hxx>
-#include <CDF_Application.hxx>
+#include <TDocStd_Application.hxx>
 #include <inspector/TInspector_Communicator.hxx>
 #include <inspector/VInspector_CallBack.hxx>
 static TInspector_Communicator* MyTCommunicator;
 static Handle(VInspector_CallBack) MyVCallBack;
-
 #endif
 
 #ifdef _DEBUG
@@ -681,6 +679,7 @@ void XGUI_Workshop::showHelpPage(const QString& thePage) const
 #endif
     QString aFileName = aDocDir + aSep + thePage;
     if (QFile::exists(aFileName)) {
+#ifdef HAVE_SALOME
       SUIT_Application* app = SUIT_Session::session()->activeApplication();
       if (app)
         app->onHelpContextModule("SHAPER", aFileName);
@@ -688,6 +687,10 @@ void XGUI_Workshop::showHelpPage(const QString& thePage) const
         QUrl aUrl = QUrl::fromLocalFile(aFileName);
         QDesktopServices::openUrl(aUrl);
       }
+#else
+      QUrl aUrl = QUrl::fromLocalFile(aFileName);
+      QDesktopServices::openUrl(aUrl);
+#endif
     }
   }
 }
@@ -1822,7 +1825,7 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked)
   }
 #ifdef TINSPECTOR
   else if (theId == "TINSPECTOR_VIEW") {
-    Handle(CDF_Application) anApplication = CDF_Session::CurrentSession()->CurrentApplication();
+    Handle(TDocStd_Application) anApplication = ModelAPI_Session::get()->application();
     if (!anApplication.IsNull())
     {
       if (!MyTCommunicator)