From 9257b41bbeedd309da7982d5a4703700bb368189 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 1 Oct 2021 16:19:22 +0300 Subject: [PATCH] Fix compilation of CAD Builder with SALOME 9.7.0 --- src/PartSet/PartSet_Module.cpp | 6 +++++- src/XGUI/XGUI_Workshop.cpp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 78130efca..3999ae85e 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -146,8 +146,10 @@ #include #include -#include +#ifdef HAVE_SALOME +#include +#endif #define FEATURE_ITEM_COLOR "0,0,225" @@ -1405,6 +1407,7 @@ double getResultTransparency(const ResultPtr& theResult) //****************************************************** void PartSet_Module::setTexture(const std::string & theTextureFile, const AISObjectPtr& thePrs) { +#ifdef HAVE_SALOME Handle(AIS_InteractiveObject) anAIS = thePrs->impl(); if (!anAIS.IsNull()) { @@ -1437,6 +1440,7 @@ void PartSet_Module::setTexture(const std::string & theTextureFile, const AISObj anAISShape->SetDisplayMode(AIS_Shaded); } } +#endif } //****************************************************** diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 79ccfdc05..e68c986e6 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -680,6 +680,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); @@ -687,6 +688,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 } } } -- 2.39.2