logic: show whole file in CodeView when file node is active

This commit is contained in:
Eberhard Graether
2015-03-24 23:01:40 +01:00
parent 0d2a76c2eb
commit eb9092a07f
6 changed files with 32 additions and 14 deletions
@@ -144,9 +144,18 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForFile(cons
{
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(file->getFilePath().str());
std::vector<std::pair<uint, uint>> ranges = getSnippetRangesForFile(file);
std::vector<CodeView::CodeSnippetParams> snippets;
std::vector<std::pair<uint, uint>> ranges;
if (file->isWholeCopy)
{
ranges.push_back(std::make_pair(1, textAccess->getLineCount()));
}
else
{
ranges = getSnippetRangesForFile(file);
}
std::vector<CodeView::CodeSnippetParams> snippets;
for (const std::pair<uint, uint>& range: ranges)
{
CodeView::CodeSnippetParams params;