logic: Fixed code not annotated for full file in snippet mode
* show focused line marker when stepping through code references
This commit is contained in:
@@ -424,8 +424,10 @@ void CodeController::expandVisibleSnippets(std::vector<CodeSnippetParams>* snipp
|
||||
continue;
|
||||
}
|
||||
|
||||
CodeView::FileState fileState = oldSnippet.locationFile->isWhole() ? CodeView::FILE_MAXIMIZED : state;
|
||||
|
||||
std::vector<CodeSnippetParams> newSnippets =
|
||||
getSnippetsForFileWithState(oldSnippet.locationFile->getFilePath(), state, addSourceLocations);
|
||||
getSnippetsForFileWithState(oldSnippet.locationFile->getFilePath(), fileState, addSourceLocations);
|
||||
if (!newSnippets.size())
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -149,6 +149,7 @@ void QtCodeArea::lineNumberAreaPaintEvent(QPaintEvent *event)
|
||||
std::set<int> focusedLineNumbers;
|
||||
|
||||
std::set<Id> activeSymbolIds = m_navigator->getActiveTokenIds();
|
||||
std::set<Id> activeLocationIds = m_navigator->getCurrentActiveLocationIds();
|
||||
|
||||
for (const Annotation& annotation : m_annotations)
|
||||
{
|
||||
@@ -178,9 +179,15 @@ void QtCodeArea::lineNumberAreaPaintEvent(QPaintEvent *event)
|
||||
|
||||
case LOCATION_TOKEN:
|
||||
case LOCATION_SCOPE:
|
||||
if (annotation.isFocused && utility::shareElement(activeSymbolIds, annotation.tokenIds))
|
||||
if (annotation.isActive && activeLocationIds.size())
|
||||
{
|
||||
focus = true;
|
||||
break;
|
||||
}
|
||||
else if (annotation.isFocused && utility::shareElement(activeSymbolIds, annotation.tokenIds))
|
||||
{
|
||||
active = true;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user