ui: Fixed error locations and messages not matching

This commit is contained in:
Eberhard Graether
2016-08-24 18:04:20 +02:00
parent 8dfc1ea9d9
commit cc8ea7c8fb
3 changed files with 20 additions and 12 deletions
+3 -3
View File
@@ -477,10 +477,10 @@ void QtCodeArea::mouseMoveEvent(QMouseEvent* event)
setHoveredAnnotations(annotations);
std::vector<std::string> errorMessages = m_navigator->getErrorMessages();
if (annotations.size() == 1 && errorMessages.size() > annotations[0]->tokenId)
if (annotations.size() == 1)
{
QToolTip::showText(event->globalPos(), QString::fromStdString(errorMessages[annotations[0]->tokenId]));
std::string errorMessage = m_navigator->getErrorMessageForId(annotations[0]->tokenId);
QToolTip::showText(event->globalPos(), QString::fromStdString(errorMessage));
}
}
}