logic: Scroll active definition to top of code view is possible

* don't log hande message
* fixed graph gets animated when using next and previous code reference shortcuts
* fixed message scroll code handling
This commit is contained in:
Eberhard Graether
2016-12-07 14:18:24 +01:00
parent 5d5a0922f5
commit 2d9052992c
20 changed files with 181 additions and 46 deletions
+18
View File
@@ -273,6 +273,24 @@ QtCodeSnippet* QtCodeFile::getFileSnippet() const
return m_fileSnippet.get();
}
std::pair<QtCodeSnippet*, int> QtCodeFile::getFirstSnippetWithActiveScope() const
{
std::pair<QtCodeSnippet*, int> result(nullptr, 0);
for (std::shared_ptr<QtCodeSnippet> snippet : m_snippets)
{
int startLineNumber = snippet->getStartLineNumberOfFirstActiveScope();
if (startLineNumber != 0)
{
result.first = snippet.get();
result.second = startLineNumber;
break;
}
}
return result;
}
bool QtCodeFile::isCollapsed() const
{
return m_locationFile != nullptr;