ui: Fixed unhovering source location does not remove graph highlight

This commit is contained in:
Eberhard Graether
2018-11-21 16:01:17 +01:00
parent 8e0a60eec7
commit 308954635e
+7 -1
View File
@@ -536,7 +536,13 @@ void QtCodeField::setHoveredAnnotations(const std::vector<const Annotation*>& an
{
if (m_hoveredAnnotations.size())
{
defocusTokenIds({});
std::vector<Id> tokenIds;
for (const Annotation* annotation : m_hoveredAnnotations)
{
tokenIds.insert(tokenIds.end(), annotation->tokenIds.begin(), annotation->tokenIds.end());
}
defocusTokenIds(tokenIds);
}
m_hoveredAnnotations = annotations;