Improve tooltip for case when a user get infinite or NaN result.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2017-04-13 17:16:53 +03:00
parent cade111206
commit 78bdd5a8af
3 changed files with 3 additions and 3 deletions

View File

@ -2670,7 +2670,7 @@ bool TMainWindow::EvalFormula(const QString &formula, bool fromUser, VContainer
if (qIsInf(result) || qIsNaN(result)) if (qIsInf(result) || qIsNaN(result))
{ {
label->setText(tr("Error") + " (" + postfix + ")."); label->setText(tr("Error") + " (" + postfix + ").");
label->setToolTip(tr("Invalid value")); label->setToolTip(tr("Invalid result. Value is infinite or NaN. Please, check your calculations."));
return false; return false;
} }

View File

@ -343,7 +343,7 @@ bool DialogIncrements::EvalIncrementFormula(const QString &formula, bool fromUse
if (qIsInf(result) || qIsNaN(result)) if (qIsInf(result) || qIsNaN(result))
{ {
label->setText(tr("Error") + " (" + postfix + ")."); label->setText(tr("Error") + " (" + postfix + ").");
label->setToolTip(tr("Invalid value")); label->setToolTip(tr("Invalid result. Value is infinite or NaN. Please, check your calculations."));
return false; return false;
} }

View File

@ -773,7 +773,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt
flag = false; flag = false;
ChangeColor(labelEditFormula, Qt::red); ChangeColor(labelEditFormula, Qt::red);
label->setText(tr("Error") + " (" + postfix + ")"); label->setText(tr("Error") + " (" + postfix + ")");
label->setToolTip(tr("Invalid value")); label->setToolTip(tr("Invalid result. Value is infinite or NaN. Please, check your calculations."));
} }
else else
{ {