ui: Fixed local reference navigation not shown for edge clicks when file content was not present yet

This commit is contained in:
Eberhard Graether
2018-08-21 14:14:39 +02:00
parent 4e68de8917
commit 366bbd6548
+10 -3
View File
@@ -552,9 +552,6 @@ void QtCodeNavigator::showActiveSnippet(
);
}
setActiveLocalTokenIds({ tokenId }, LOCATION_TOKEN);
updateFiles();
if (m_mode == MODE_LIST)
{
for (const FilePath& filePath : filePathsToExpand)
@@ -567,6 +564,9 @@ void QtCodeNavigator::showActiveSnippet(
m_single->requestFileContent(firstReference.filePath);
}
setActiveLocalTokenIds({ tokenId }, LOCATION_TOKEN);
updateFiles();
if (firstReference.tokenId)
{
if (scrollTo)
@@ -660,6 +660,13 @@ void QtCodeNavigator::showContents()
}
m_current->showContents();
// look for local references again, in case file content was not present when local symbols were activated
if (m_activeLocalTokenIds.size() && !m_localReferences.size())
{
setActiveLocalTokenIds(utility::toVector(m_activeLocalTokenIds), LOCATION_TOKEN);
updateRefLabels();
}
}
size_t QtCodeNavigator::findScreenMatches(const std::wstring& query)