diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 65485795f356955fa0892889aa9c6bdf10b04c0c..d5b9f6d3977bcd072c5d68a39378f7fe4ab17bbb 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -907,7 +907,10 @@ void Msg::ExchangeOnelabParameter(const std::string &key, } if(noLoop && copt.count("Loop")) ps[0].setAttribute("Loop", copt["Loop"][0]); if(noGraph && copt.count("Graph")) ps[0].setAttribute("Graph", copt["Graph"][0]); - if(noClosed && copt.count("Closed")) ps[0].setAttribute("Closed", copt["Closed"][0]); + if(noClosed && copt.count("Closed")) // for backward compatibility + ps[0].setAttribute("Closed", copt["Closed"][0]); + if(noClosed && fopt.count("Closed")) + ps[0].setAttribute("Closed", fopt["Closed"][0] ? "1" : "0"); _setStandardOptions(&ps[0], fopt, copt); _onelabClient->set(ps[0]); #endif @@ -943,7 +946,10 @@ void Msg::ExchangeOnelabParameter(const std::string &key, } if(copt.count("Kind")) ps[0].setKind(copt["Kind"][0]); if(noChoices && copt.count("Choices")) ps[0].setChoices(copt["Choices"]); - if(noClosed && copt.count("Closed")) ps[0].setAttribute("Closed", copt["Closed"][0]); + if(noClosed && copt.count("Closed")) // for backward compatibility + ps[0].setAttribute("Closed", copt["Closed"][0]); + if(noClosed && fopt.count("Closed")) + ps[0].setAttribute("Closed", fopt["Closed"][0] ? "1" : "0"); if(noMultipleSelection && copt.count("MultipleSelection")) ps[0].setAttribute("MultipleSelection", copt["MultipleSelection"][0]); _setStandardOptions(&ps[0], fopt, copt);