]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Bos #24389: SHAPER default browser
authorazv <azv@opencascade.com>
Wed, 16 Jun 2021 13:19:29 +0000 (16:19 +0300)
committerazv <azv@opencascade.com>
Wed, 16 Jun 2021 13:19:29 +0000 (16:19 +0300)
Use default browser specified in SALOME Preferences.

src/XGUI/XGUI_Workshop.cpp

index a63aae11ef8226e5a4c161a9126168863b135f31..79ccfdc050b47a5b90a3c7cfcbb27b9f24df7b30 100644 (file)
 #include <XGUI_InspectionPanel.h>
 #include <XGUI_CompressFiles.h>
 
-#ifndef HAVE_SALOME
+#ifdef HAVE_SALOME
+#include <SUIT_Application.h>
+#include <SUIT_Session.h>
+#else
 #include <AppElements_Button.h>
 #include <AppElements_Command.h>
 #include <AppElements_MainMenu.h>
@@ -677,8 +680,13 @@ void XGUI_Workshop::showHelpPage(const QString& thePage) const
 #endif
     QString aFileName = aDocDir + aSep + thePage;
     if (QFile::exists(aFileName)) {
-      QUrl aUrl = QUrl::fromLocalFile(aFileName);
-      QDesktopServices::openUrl(aUrl);
+      SUIT_Application* app = SUIT_Session::session()->activeApplication();
+      if (app)
+        app->onHelpContextModule("SHAPER", aFileName);
+      else {
+        QUrl aUrl = QUrl::fromLocalFile(aFileName);
+        QDesktopServices::openUrl(aUrl);
+      }
     }
   }
 }