]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Workaround to enable the display mechanism right after the python script started... CR26446
authorazv <azv@opencascade.com>
Wed, 15 Dec 2021 06:29:50 +0000 (09:29 +0300)
committerazv <azv@opencascade.com>
Wed, 15 Dec 2021 06:29:50 +0000 (09:29 +0300)
src/ModelHighAPI/CMakeLists.txt
src/ModelHighAPI/ModelHighAPI_Services.cpp

index 2d7a4917f409303906b8799b958bb677e1280eaf..07adac9db8d19c84f9c7306795022b79a9b61202 100644 (file)
@@ -58,6 +58,7 @@ SET(PROJECT_LIBRARIES
   Locale
   ModelAPI
   ModelGeomAlgo
+  ModuleBase
 )
 
 ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS -DWNT)
@@ -87,6 +88,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/Locale
   ${PROJECT_SOURCE_DIR}/src/ModelAPI
   ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
+  ${PROJECT_SOURCE_DIR}/src/ModuleBase
   ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
   ${OpenCASCADE_INCLUDE_DIR}
 )
index 09dea983c9743077e5e0a2631f7588b8d54b8e49..763798c8b72bb35dcdc2f8b60b64ba5f24112ece 100644 (file)
@@ -26,6 +26,8 @@
 #include <ModelAPI_ResultConstruction.h>
 #include <ModelAPI_Events.h>
 
+#include <ModuleBase_Tools.h>
+
 #include <cmath>
 #include <sstream>
 
@@ -106,8 +108,9 @@ void begin()
     aNbTransactions = aNbUndo;
     ++aTransactionID;
   }
+  static std::string anOperationPrefix(ModuleBase_Tools::translate("", "Operation").toStdString());
   std::ostringstream aTransactionName;
-  aTransactionName << "Operation_" << aTransactionID;
+  aTransactionName << anOperationPrefix << "_" << aTransactionID;
   ModelAPI_Session::get()->startOperation(aTransactionName.str());
 }