diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index cc5b793e53..0fee1e4cc4 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -253,11 +253,10 @@ void InputField::newInput(const QString & text) res = Quantity::parse(input); } catch(Base::Exception &e){ - ErrorText = e.what(); - this->setToolTip(QString::fromLatin1(ErrorText.c_str())); + QString errorText = QString::fromLatin1(e.what()); QPixmap pixmap = getValidationIcon(":/icons/button_invalid.svg", QSize(sizeHint().height(),sizeHint().height())); iconLabel->setPixmap(pixmap); - parseError(QString::fromLatin1(ErrorText.c_str())); + parseError(errorText); validInput = false; return; } @@ -267,7 +266,6 @@ void InputField::newInput(const QString & text) // check if unit fits! if(!actUnit.isEmpty() && !res.getUnit().isEmpty() && actUnit != res.getUnit()){ - this->setToolTip(QString::fromLatin1("Wrong unit")); QPixmap pixmap = getValidationIcon(":/icons/button_invalid.svg", QSize(sizeHint().height(),sizeHint().height())); iconLabel->setPixmap(pixmap); parseError(QString::fromLatin1("Wrong unit")); @@ -278,20 +276,15 @@ void InputField::newInput(const QString & text) QPixmap pixmap = getValidationIcon(":/icons/button_valid.svg", QSize(sizeHint().height(),sizeHint().height())); iconLabel->setPixmap(pixmap); - ErrorText = ""; validInput = true; if (res.getValue() > Maximum){ res.setValue(Maximum); - ErrorText = "Maximum reached"; } if (res.getValue() < Minimum){ res.setValue(Minimum); - ErrorText = "Minimum reached"; } - this->setToolTip(QString::fromLatin1(ErrorText.c_str())); - double dFactor; res.getUserString(dFactor,actUnitStr); actUnitValue = res.getValue()/dFactor; diff --git a/src/Gui/InputField.h b/src/Gui/InputField.h index fa522af38f..a2842c6162 100644 --- a/src/Gui/InputField.h +++ b/src/Gui/InputField.h @@ -184,7 +184,6 @@ private: private: QLabel* iconLabel; QByteArray m_sPrefGrp; - std::string ErrorText; bool validInput; /// handle to the parameter group for defaults and history