diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 59c96c84f67482982bdb17189c79c6c26b85f11d..415c39f730f497587a40cd08bafaa1e505b95dd1 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -727,14 +727,14 @@ void Msg::ExchangeOnelabParameter(const std::string &key, if(val[0] > 0){ ps[0].setMin(val[0] / fact); ps[0].setMax(val[0] * fact); - ps[0].setStep((val[0] * fact - val[0] / fact) / 100.); + ps[0].setStep((ps[0].getMax() - ps[0].getMin()) / 100.); } else if(val[0] < 0){ ps[0].setMin(val[0] * fact); ps[0].setMax(val[0] / fact); - ps[0].setStep((val[0] / fact - val[0] * fact) / 100.); + ps[0].setStep((ps[0].getMax() - ps[0].getMin()) / 100.); } - if(isInteger){ + if(val[0] && isInteger){ ps[0].setMin((int)ps[0].getMin()); ps[0].setMax((int)ps[0].getMax()); ps[0].setStep((int)ps[0].getStep());