From 78bdd5a8afc022a0c980eb04a24b08035ae0fc94 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 13 Apr 2017 17:16:53 +0300 Subject: [PATCH] Improve tooltip for case when a user get infinite or NaN result. --HG-- branch : release --- src/app/tape/tmainwindow.cpp | 2 +- src/app/valentina/dialogs/dialogincrements.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index ed2b7a184..f5f41da63 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -2670,7 +2670,7 @@ bool TMainWindow::EvalFormula(const QString &formula, bool fromUser, VContainer if (qIsInf(result) || qIsNaN(result)) { 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; } diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index f174a7563..ef9ae5920 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -343,7 +343,7 @@ bool DialogIncrements::EvalIncrementFormula(const QString &formula, bool fromUse if (qIsInf(result) || qIsNaN(result)) { 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; } diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 87eb81526..3d99e37ea 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -773,7 +773,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt flag = false; ChangeColor(labelEditFormula, Qt::red); 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 {