Improve tooltip for case when a user get infinite or NaN result.
--HG-- branch : release
This commit is contained in:
parent
cade111206
commit
78bdd5a8af
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user