From be18a4d48d99fe7af96f0d5f2b5d8e466c0fc01d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 8 Jul 2013 14:28:08 +0000 Subject: [PATCH] Fix canceling of Compute() + static std::string GetExeName(); --- src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx | 13 +++++++++++-- src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx index 90297a4..c236a76 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx @@ -1395,8 +1395,7 @@ bool GHS3DPlugin_Hypothesis::SetParametersByDefaults(const TDefaults& /*dflts*/ std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* hyp, const bool hasShapeToMesh) { - TCollection_AsciiString cmd; - cmd = "mg-tetra.exe"; + TCollection_AsciiString cmd = GetExeName().c_str(); // check if any option is overridden by hyp->myTextOption bool m = hyp ? ( hyp->myTextOption.find("-m") == std::string::npos ) : true; bool M = hyp ? ( hyp->myTextOption.find("-M") == std::string::npos ) : true; @@ -1528,6 +1527,16 @@ std::string GHS3DPlugin_Hypothesis::GetFileName(const GHS3DPlugin_Hypothesis* hy return aGenericName.ToCString(); } +//================================================================================ +/* + * Return the name of executable + */ +//================================================================================ + +std::string GHS3DPlugin_Hypothesis::GetExeName() +{ + return "mg-tetra.exe"; +} //================================================================================ /*! diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx index 7d6b1ad..f3b2028 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx @@ -223,6 +223,10 @@ public: * \brief Return a unique file name */ static std::string GetFileName(const GHS3DPlugin_Hypothesis* hyp); + /*! + * \brief Return the name of executable + */ + static std::string GetExeName(); /*! * To set an enforced vertex -- 2.39.2