From: azv Date: Wed, 15 Dec 2021 06:29:50 +0000 (+0300) Subject: Workaround to enable the display mechanism right after the python script started... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR26446;p=modules%2Fshaper.git Workaround to enable the display mechanism right after the python script started execution. --- diff --git a/src/ModelHighAPI/CMakeLists.txt b/src/ModelHighAPI/CMakeLists.txt index 2d7a4917f..07adac9db 100644 --- a/src/ModelHighAPI/CMakeLists.txt +++ b/src/ModelHighAPI/CMakeLists.txt @@ -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} ) diff --git a/src/ModelHighAPI/ModelHighAPI_Services.cpp b/src/ModelHighAPI/ModelHighAPI_Services.cpp index 09dea983c..763798c8b 100644 --- a/src/ModelHighAPI/ModelHighAPI_Services.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Services.cpp @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -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()); }