Skip to content
Snippets Groups Projects
Commit f07eec86 authored by Francois Henrotte's avatar Francois Henrotte
Browse files

No commit message

No commit message
parent af86237b
No related branches found
No related tags found
No related merge requests found
......@@ -650,10 +650,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
_onelabClient->get(ps, name);
bool noRange = true, noChoices = true, noLoop = true, noGraph = true;
if(ps.size()){
if(ps[0].getReadOnly())
ps[0].setValue(val[0]); // use value from gmsh (so it is updated if necessary)
else
val[0] = ps[0].getValue(); // use value from server
val[0] = ps[0].getValue(); // always use value from server
// keep track of these attributes, which can be changed server-side
if(ps[0].getMin() != -onelab::parameter::maxNumber() ||
ps[0].getMax() != onelab::parameter::maxNumber() ||
......@@ -686,7 +683,13 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
if(copt.count("Choices")) ps[0].setChoiceLabels(copt["Choices"]);
}
if(fopt.count("Visible")) ps[0].setVisible(fopt["Visible"][0] ? true : false);
if(fopt.count("ReadOnly")) ps[0].setReadOnly(fopt["ReadOnly"][0] ? true : false);
if(fopt.count("ReadOnly")) {
ps[0].setReadOnly(fopt["ReadOnly"][0] ? true : false);
// If the parameter is set "read-only" here,
// the local value is used instead of that from the server
if(ps[0].getReadOnly())
ps[0].setValue(val[0]);
}
if(copt.count("Help")) ps[0].setHelp(copt["Help"][0]);
if(copt.count("Label")) ps[0].setLabel(copt["Label"][0]);
if(copt.count("ShortHelp")) ps[0].setLabel(copt["ShortHelp"][0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment