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
+25
View File
@@ -275,6 +275,31 @@ uint QtCodeArea::getLineNumberForLocationId(Id locationId) const
return 0;
}
int QtCodeArea::getStartLineNumberOfFirstActiveScope() const
{
int firstActiveLine = 0;
for (const Annotation& annotation : m_annotations)
{
if (annotation.locationType == LocationType::LOCATION_SCOPE && annotation.isActive)
{
if (firstActiveLine && firstActiveLine != annotation.startLine)
{
return annotation.startLine;
}
else
{
return getStartLineNumber();
}
}
else if (annotation.isActive)
{
firstActiveLine = annotation.startLine;
}
}
return 0;
}
QRectF QtCodeArea::getLineRectForLineNumber(uint lineNumber) const
{
if (lineNumber < getStartLineNumber())