ui: Fixed fulltext search locations disappearing when expanding scope in code snippet view
This commit is contained in:
@@ -149,6 +149,13 @@ QtCodeSnippet* QtCodeFile::insertCodeSnippet(const CodeSnippetParams& params)
|
|||||||
m_navigator->clearSnippetReferences();
|
m_navigator->clearSnippetReferences();
|
||||||
newSnippet = QtCodeSnippet::merged(newSnippet, oldSnippet, m_navigator, this);
|
newSnippet = QtCodeSnippet::merged(newSnippet, oldSnippet, m_navigator, this);
|
||||||
}
|
}
|
||||||
|
else if (oldSnippet->getStartLineNumber() >= start && oldSnippet->getEndLineNumber() <= end) // enclosing
|
||||||
|
{
|
||||||
|
// copy all source locations from old to new snippet: fulltext locations got lost
|
||||||
|
oldSnippet->getArea()->getSourceLocationFile()->copySourceLocations(
|
||||||
|
newSnippet->getArea()->getSourceLocationFile());
|
||||||
|
newSnippet->getArea()->updateSourceLocations(oldSnippet->getArea()->getSourceLocationFile());
|
||||||
|
}
|
||||||
|
|
||||||
oldSnippet->hide();
|
oldSnippet->hide();
|
||||||
m_snippetLayout->removeWidget(oldSnippet);
|
m_snippetLayout->removeWidget(oldSnippet);
|
||||||
|
|||||||
Reference in New Issue
Block a user