Skip to content
Snippets Groups Projects
Commit 6bcc8495 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent b4c89adf
No related branches found
No related tags found
No related merge requests found
...@@ -721,7 +721,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key, ...@@ -721,7 +721,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
// range and step (this makes the gui much nicer to use) // range and step (this makes the gui much nicer to use)
if(noRange && !fopt.count("Range") && !fopt.count("Step") && if(noRange && !fopt.count("Range") && !fopt.count("Step") &&
!fopt.count("Min") && !fopt.count("Max")){ !fopt.count("Min") && !fopt.count("Max")){
bool isInteger = (std::floor(val[0]) == val[0]); bool isInteger = (floor(val[0]) == val[0]);
double fact = isInteger ? 10. : 100.; double fact = isInteger ? 10. : 100.;
if(val[0] > 0){ if(val[0] > 0){
ps[0].setMin(val[0] / fact); ps[0].setMin(val[0] / fact);
...@@ -733,7 +733,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key, ...@@ -733,7 +733,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
ps[0].setMax(val[0] / fact); ps[0].setMax(val[0] / fact);
ps[0].setStep((val[0] / fact - val[0] * fact) / 100.); ps[0].setStep((val[0] / fact - val[0] * fact) / 100.);
} }
if(std::floor(val[0]) == val[0]){ // integer if(isInteger){
ps[0].setMin((int)ps[0].getMin()); ps[0].setMin((int)ps[0].getMin());
ps[0].setMax((int)ps[0].getMax()); ps[0].setMax((int)ps[0].getMax());
ps[0].setStep((int)ps[0].getStep()); ps[0].setStep((int)ps[0].getStep());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment